From 8d8981b9a8dda8c9f34f591561e2cbe0008ba9c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Kukli=C5=84ski?= Date: Tue, 8 Oct 2024 21:50:50 +0200 Subject: [PATCH] Fix issues related to docker application setup --- bin/{fixtures => docker-setup} | 10 ++++++++-- docker-compose.yml | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) rename bin/{fixtures => docker-setup} (63%) diff --git a/bin/fixtures b/bin/docker-setup similarity index 63% rename from bin/fixtures rename to bin/docker-setup index 2c0180fe..58aeb87c 100755 --- a/bin/fixtures +++ b/bin/docker-setup @@ -2,13 +2,19 @@ mkdir -p tests/Application/var/log mkdir -p tests/Application/var/cache -chown www-data:www-data tests/Application/var/log -chown www-data:www-data tests/Application/var/cache +chown -Rf www-data:www-data tests/Application/var/log +chown -Rf www-data:www-data tests/Application/var/cache chown -Rf www-data:www-data tests/Application/public/media chown -Rf www-data:www-data tests/Application/public/media/* +composer install + tests/Application/bin/console cache:clear +tests/Application/bin/console assets:install tests/Application/bin/console doctrine:database:create --if-not-exists tests/Application/bin/console doctrine:schema:update --force tests/Application/bin/console sylius:fixtures:load -n + +(cd tests/Application && yarn install) +(cd tests/Application && yarn dev) diff --git a/docker-compose.yml b/docker-compose.yml index 3c53ae87..8c88251a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,8 @@ services: context: . environment: APP_ENV: "dev" - DATABASE_URL: "mysql://root:mysql@mysql/sylius_%kernel.environment%?charset=utf8mb4" + DATABASE_SERVER_VERSION: "8.0.39" + DATABASE_URL: "mysql://root:mysql@mysql/sylius_%kernel.environment%??charset=utf8mb4&serverVersion=8.0.39" # DATABASE_URL: "pgsql://root:postgres@postgres/sylius_%kernel.environment%?charset=utf8" # When using postgres PHP_DATE_TIMEZONE: "Europe/Warsaw" volumes: