Skip to content

Commit 1395930

Browse files
committed
Adapt installation for dump env var
1 parent 967f3f2 commit 1395930

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.dockerignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@
88
**/.gitattributes
99
**/.gitignore
1010
**/.gitmodules
11+
**/docker-compose.*.yaml
12+
**/docker-compose.*.yml
13+
**/docker-compose.yaml
14+
**/docker-compose.yml
1115
**/Dockerfile
1216
**/Thumbs.db
1317
.editorconfig
14-
.env*
18+
.env.*.local
19+
.env.local
20+
.env.local.php
1521
.php_cs.cache
1622
bin/*
1723
!bin/console

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ ENV STABILITY ${STABILITY:-stable}
8585
ARG SYMFONY_VERSION=""
8686

8787
# Download the Symfony skeleton and leverage Docker cache layers
88-
RUN composer create-project "symfony/skeleton ${SYMFONY_VERSION}" . --stability=$STABILITY --prefer-dist --no-dev --no-progress --no-scripts --no-interaction; \
88+
RUN composer create-project "symfony/skeleton ${SYMFONY_VERSION}" . --stability=$STABILITY --prefer-dist --no-dev --no-progress --no-interaction; \
8989
composer clear-cache
9090

9191
###> recipes ###
@@ -95,8 +95,9 @@ COPY . .
9595

9696
RUN set -eux; \
9797
mkdir -p var/cache var/log; \
98-
composer install --no-progress --no-suggest --no-interaction --no-dev --no-scripts; \
98+
composer install --prefer-dist --no-dev --no-progress --no-scripts --no-interaction; \
9999
composer dump-autoload --classmap-authoritative --no-dev; \
100+
composer symfony:dump-env prod; \
100101
composer run-script --no-dev post-install-cmd; sync
101102
VOLUME /srv/app/var
102103

docker/php/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
2525
cp -Rp tmp/. .
2626
rm -Rf tmp/
2727
elif [ "$APP_ENV" != 'prod' ]; then
28+
rm -f .env.local.php
2829
composer install --prefer-dist --no-progress --no-suggest --no-interaction
2930
fi
3031

0 commit comments

Comments
 (0)