Skip to content

Commit

Permalink
Reduced errors when creating Doctrine schema in Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianLeChat committed Dec 18, 2023
1 parent 4b68201 commit 7dacb4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ 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 \
echo '/wait && mkdir -p var/cache var/log && \
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
Expand Down

0 comments on commit 7dacb4d

Please sign in to comment.