Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim authored Dec 6, 2024
1 parent 78a64c0 commit 07da170
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions symfony-flex/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ ARG SHOPWARE_VERSION=6.6.3.0
RUN --mount=type=cache,id=sqldump=${SHOPWARE_VERSION},sharing=locked,target=/var/cache/sql <<EOF
set -eo pipefail
/usr/bin/mariadbd --basedir=/usr --datadir=/var/lib/mariadb --plugin-dir=/usr/lib/mariadb/plugin --user=www-data --skip-networking &
until mariadb-admin ping; do sleep 1; done
until mariadb-admin -hlocalhost ping; do sleep 1; done

php bin/console system:install --create-database --force
mariadb -uroot -proot shopware -e "DELETE FROM sales_channel WHERE id = 0x98432def39fc4624b33213a56b8c944d"
mariadb -hlocalhost -uroot -proot shopware -e "DELETE FROM sales_channel WHERE id = 0x98432def39fc4624b33213a56b8c944d"
php bin/console user:create "admin" --admin --password="shopware" -n
php bin/console sales-channel:create:storefront --name=Storefront --url="http://localhost:8000"
php bin/console theme:change --all Storefront
mariadb -uroot -proot -e "SET GLOBAL innodb_fast_shutdown=0"
mariadb -uroot -proot shopware -e "INSERT INTO system_config (id, configuration_key, configuration_value, sales_channel_id, created_at, updated_at) VALUES (0xb3ae4d7111114377af9480c4a0911111, 'core.frw.completedAt', '{\"_value\": \"2019-10-07T10:46:23+00:00\"}', NULL, '2019-10-07 10:46:23.169', NULL);"
mariadb -hlocalhost -uroot -proot -e "SET GLOBAL innodb_fast_shutdown=0"
mariadb -hlocalhost -uroot -proot shopware -e "INSERT INTO system_config (id, configuration_key, configuration_value, sales_channel_id, created_at, updated_at) VALUES (0xb3ae4d7111114377af9480c4a0911111, 'core.frw.completedAt', '{\"_value\": \"2019-10-07T10:46:23+00:00\"}', NULL, '2019-10-07 10:46:23.169', NULL);"
rm -rf var/cache/* /var/tmp/*
php bin/console

sudo chown -R www-data /var/cache/sql/

mariadb-dump shopware | gzip > /var/cache/sql/shopware.sql.gz
mariadb-dump -hlocalhost shopware | gzip > /var/cache/sql/shopware.sql.gz
EOF

FROM base
Expand All @@ -64,8 +64,8 @@ ARG SHOPWARE_VERSION=6.6.3.0
RUN --mount=type=cache,id=sqldump=${SHOPWARE_VERSION},sharing=locked,target=/var/cache/sql <<EOF
set -eo pipefail
/usr/bin/mariadbd --basedir=/usr --datadir=/var/lib/mariadb --plugin-dir=/usr/lib/mariadb/plugin --user=www-data --skip-networking &
until mariadb-admin ping; do sleep 1; done
until mariadb-admin -hlocalhost ping; do sleep 1; done

mariadb -e 'CREATE DATABASE shopware'
zcat /var/cache/sql/shopware.sql.gz | mariadb shopware
mariadb -hlocalhost -e 'CREATE DATABASE shopware'
zcat /var/cache/sql/shopware.sql.gz | mariadb -hlocalhost shopware
EOF

0 comments on commit 07da170

Please sign in to comment.