diff --git a/.docker/entrypoint.prod.sh b/.docker/entrypoint.prod.sh index 7a74393..2b320e6 100644 --- a/.docker/entrypoint.prod.sh +++ b/.docker/entrypoint.prod.sh @@ -1,10 +1,6 @@ #!/bin/bash set -e -# Source environment variables -echo "Sourcing environment variables..." -. /etc/environment - # Run database migrations echo "Running database migrations..." php bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration diff --git a/.docker/supervisord.conf b/.docker/supervisord.conf index 4e829e8..600c230 100644 --- a/.docker/supervisord.conf +++ b/.docker/supervisord.conf @@ -35,4 +35,4 @@ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -environment=HOME="/root",USER="root" +EnvironmentFile=/etc/environment diff --git a/Dockerfile b/Dockerfile index 07519c3..00d283b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,6 @@ ENV APP_ENV=prod ENV APP_DEBUG=0 RUN cp $PHP_INI_DIR/php.ini-production $PHP_INI_DIR/php.ini COPY . . -RUN echo ". /etc/environment" >> /etc/default/supervisor ADD --chmod=0755 ./.docker/entrypoint.prod.sh /usr/local/bin/entrypoint.sh RUN composer install --no-dev --optimize-autoloader --no-interaction RUN php bin/console cache:clear && php bin/console cache:warmup