Missing install for prod mode

This commit is contained in:
maxhelias
2020-06-19 19:37:13 +02:00
parent eaf5639e41
commit 967f3f270a
2 changed files with 19 additions and 14 deletions

View File

@@ -13,20 +13,20 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
fi
ln -sf "$PHP_INI_RECOMMENDED" "$PHP_INI_DIR/php.ini"
mkdir -p var/cache var/log
mkdir -p var/cache var/log
# The first time volumes are mounted, the project needs to be recreated
if [ ! -f composer.json ]; then
composer create-project "symfony/skeleton $SYMFONY_VERSION" tmp --stability=$STABILITY --prefer-dist --no-progress --no-interaction
jq '.extra.symfony.docker=true' tmp/composer.json > tmp/composer.tmp.json
rm tmp/composer.json
mv tmp/composer.tmp.json tmp/composer.json
# The first time volumes are mounted, the project needs to be recreated
if [ ! -f composer.json ]; then
composer create-project "symfony/skeleton $SYMFONY_VERSION" tmp --stability=$STABILITY --prefer-dist --no-progress --no-interaction
jq '.extra.symfony.docker=true' tmp/composer.json > tmp/composer.tmp.json
rm tmp/composer.json
mv tmp/composer.tmp.json tmp/composer.json
cp -Rp tmp/. .
rm -Rf tmp/
elif [ "$APP_ENV" != 'prod' ]; then
composer install --prefer-dist --no-progress --no-suggest --no-interaction
fi
cp -Rp tmp/. .
rm -Rf tmp/
elif [ "$APP_ENV" != 'prod' ]; then
composer install --prefer-dist --no-progress --no-suggest --no-interaction
fi
setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var