From 73fecdedf968b3be06b22a3a025c626d0f593b45 Mon Sep 17 00:00:00 2001 From: Heiko Holland Date: Sun, 30 Jul 2017 14:27:48 +0200 Subject: [PATCH] run composer install after custom scripts, install dev packages when APPLICATION_ENV is set to development --- scripts/start.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/start.sh b/scripts/start.sh index 7496767..b507187 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -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