diff --git a/.dockerignore b/.dockerignore index 9eda228..eed80d3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,10 +8,16 @@ **/.gitattributes **/.gitignore **/.gitmodules +**/docker-compose.*.yaml +**/docker-compose.*.yml +**/docker-compose.yaml +**/docker-compose.yml **/Dockerfile **/Thumbs.db .editorconfig -.env* +.env.*.local +.env.local +.env.local.php .php_cs.cache bin/* !bin/console diff --git a/Dockerfile b/Dockerfile index 5ae1638..ebab086 100644 --- a/Dockerfile +++ b/Dockerfile @@ -85,7 +85,7 @@ ENV STABILITY ${STABILITY:-stable} ARG SYMFONY_VERSION="" # Download the Symfony skeleton and leverage Docker cache layers -RUN composer create-project "symfony/skeleton ${SYMFONY_VERSION}" . --stability=$STABILITY --prefer-dist --no-dev --no-progress --no-scripts --no-interaction; \ +RUN composer create-project "symfony/skeleton ${SYMFONY_VERSION}" . --stability=$STABILITY --prefer-dist --no-dev --no-progress --no-interaction; \ composer clear-cache ###> recipes ### @@ -95,8 +95,9 @@ COPY . . RUN set -eux; \ mkdir -p var/cache var/log; \ - composer install --no-progress --no-suggest --no-interaction --no-dev --no-scripts; \ + composer install --prefer-dist --no-dev --no-progress --no-scripts --no-interaction; \ composer dump-autoload --classmap-authoritative --no-dev; \ + composer symfony:dump-env prod; \ composer run-script --no-dev post-install-cmd; sync VOLUME /srv/app/var diff --git a/docker/php/docker-entrypoint.sh b/docker/php/docker-entrypoint.sh index 3e3eca5..4333f15 100755 --- a/docker/php/docker-entrypoint.sh +++ b/docker/php/docker-entrypoint.sh @@ -25,6 +25,7 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then cp -Rp tmp/. . rm -Rf tmp/ elif [ "$APP_ENV" != 'prod' ]; then + rm -f .env.local.php composer install --prefer-dist --no-progress --no-suggest --no-interaction fi