Adapt installation for dump env var
This commit is contained in:
parent
967f3f270a
commit
139593083d
@ -8,10 +8,16 @@
|
|||||||
**/.gitattributes
|
**/.gitattributes
|
||||||
**/.gitignore
|
**/.gitignore
|
||||||
**/.gitmodules
|
**/.gitmodules
|
||||||
|
**/docker-compose.*.yaml
|
||||||
|
**/docker-compose.*.yml
|
||||||
|
**/docker-compose.yaml
|
||||||
|
**/docker-compose.yml
|
||||||
**/Dockerfile
|
**/Dockerfile
|
||||||
**/Thumbs.db
|
**/Thumbs.db
|
||||||
.editorconfig
|
.editorconfig
|
||||||
.env*
|
.env.*.local
|
||||||
|
.env.local
|
||||||
|
.env.local.php
|
||||||
.php_cs.cache
|
.php_cs.cache
|
||||||
bin/*
|
bin/*
|
||||||
!bin/console
|
!bin/console
|
||||||
|
@ -85,7 +85,7 @@ ENV STABILITY ${STABILITY:-stable}
|
|||||||
ARG SYMFONY_VERSION=""
|
ARG SYMFONY_VERSION=""
|
||||||
|
|
||||||
# Download the Symfony skeleton and leverage Docker cache layers
|
# 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
|
composer clear-cache
|
||||||
|
|
||||||
###> recipes ###
|
###> recipes ###
|
||||||
@ -95,8 +95,9 @@ COPY . .
|
|||||||
|
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
mkdir -p var/cache var/log; \
|
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 dump-autoload --classmap-authoritative --no-dev; \
|
||||||
|
composer symfony:dump-env prod; \
|
||||||
composer run-script --no-dev post-install-cmd; sync
|
composer run-script --no-dev post-install-cmd; sync
|
||||||
VOLUME /srv/app/var
|
VOLUME /srv/app/var
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
|
|||||||
cp -Rp tmp/. .
|
cp -Rp tmp/. .
|
||||||
rm -Rf tmp/
|
rm -Rf tmp/
|
||||||
elif [ "$APP_ENV" != 'prod' ]; then
|
elif [ "$APP_ENV" != 'prod' ]; then
|
||||||
|
rm -f .env.local.php
|
||||||
composer install --prefer-dist --no-progress --no-suggest --no-interaction
|
composer install --prefer-dist --no-progress --no-suggest --no-interaction
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user