Skip to content

Commit

Permalink
fix: Remove sourcing of environment variables from entrypoint script …
Browse files Browse the repository at this point in the history
…and update supervisord configuration to use EnvironmentFile
  • Loading branch information
MrAnyx committed Jan 3, 2025
1 parent f942a05 commit 5f977c8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions .docker/entrypoint.prod.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion .docker/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f977c8

Please sign in to comment.