From 7dacb4dbd5d0deb6850838e99a114efdc6cb09fd Mon Sep 17 00:00:00 2001 From: Florian Trayon <26360935+FlorianLeChat@users.noreply.github.com> Date: Mon, 18 Dec 2023 10:33:54 +0100 Subject: [PATCH] Reduced errors when creating Doctrine schema in Docker image --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6057b621..f328811f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -107,7 +107,7 @@ RUN if [ $VERSION = "apache" ]; then \ sed -i "s/DATABASE_PASSWORD=password/DATABASE_PASSWORD=$(cat /run/secrets/db_password)/g" .env && \ /usr/local/bin/php bin/console cache:clear && composer dump-env prod && \ /usr/local/bin/php bin/console doctrine:database:create --no-interaction --if-not-exists && \ - /usr/local/bin/php bin/console doctrine:schema:create --no-interaction && \ + /usr/local/bin/php bin/console doctrine:schema:update --complete --force && \ /usr/local/bin/php bin/console app:udp-server 127.0.0.1:2004 & \ apache2-foreground' > docker/entrypoint.sh; \ else \ @@ -115,7 +115,7 @@ RUN if [ $VERSION = "apache" ]; then \ sed -i "s/DATABASE_PASSWORD=password/DATABASE_PASSWORD=$(cat /run/secrets/db_password)/g" .env && \ /usr/local/bin/php bin/console cache:clear && composer dump-env prod && \ /usr/local/bin/php bin/console doctrine:database:create --no-interaction --if-not-exists && \ - /usr/local/bin/php bin/console doctrine:schema:create --no-interaction && \ + /usr/local/bin/php bin/console doctrine:schema:update --complete --force && \ /usr/local/bin/php bin/console app:udp-server 127.0.0.1:2004 & \ php-fpm' > docker/entrypoint.sh; \ fi