Skip to content

Commit

Permalink
Fix issues related to docker application setup
Browse files Browse the repository at this point in the history
  • Loading branch information
senghe committed Oct 8, 2024
1 parent a52dce0 commit 8d8981b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 8 additions & 2 deletions bin/fixtures → bin/docker-setup
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8d8981b

Please sign in to comment.