run composer install after custom scripts, install dev packages when APPLICATION_ENV is set to development

This commit is contained in:
Heiko Holland
2017-07-30 14:27:48 +02:00
parent 3ef8afd8af
commit 73fecdedf9

View File

@@ -60,11 +60,6 @@ if [ ! -d "/var/www/html/.git" ]; then
fi
fi
# Try auto install for composer
if [ -f "/var/www/html/composer.lock" ]; then
composer install --no-dev --working-dir=/var/www/html
fi
# Enable custom nginx config files if they exist
if [ -f /var/www/html/conf/nginx/nginx-site.conf ]; then
cp /var/www/html/conf/nginx/nginx-site.conf /etc/nginx/sites-available/default.conf
@@ -146,6 +141,15 @@ if [[ "$RUN_SCRIPTS" == "1" ]] ; then
fi
fi
# Try auto install for composer
if [ -f "/var/www/html/composer.lock" ]; then
if [ "$APPLICATION_ENV" == "development" ]; then
composer install --working-dir=/var/www/html
else
composer install --no-dev --working-dir=/var/www/html
fi
fi
# Start supervisord and services
exec /usr/bin/supervisord -n -c /etc/supervisord.conf