Skip to content

Commit 73fecde

Browse files
committed
run composer install after custom scripts, install dev packages when APPLICATION_ENV is set to development
1 parent 3ef8afd commit 73fecde

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

scripts/start.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@ if [ ! -d "/var/www/html/.git" ]; then
6060
fi
6161
fi
6262

63-
# Try auto install for composer
64-
if [ -f "/var/www/html/composer.lock" ]; then
65-
composer install --no-dev --working-dir=/var/www/html
66-
fi
67-
6863
# Enable custom nginx config files if they exist
6964
if [ -f /var/www/html/conf/nginx/nginx-site.conf ]; then
7065
cp /var/www/html/conf/nginx/nginx-site.conf /etc/nginx/sites-available/default.conf
@@ -146,6 +141,15 @@ if [[ "$RUN_SCRIPTS" == "1" ]] ; then
146141
fi
147142
fi
148143

144+
# Try auto install for composer
145+
if [ -f "/var/www/html/composer.lock" ]; then
146+
if [ "$APPLICATION_ENV" == "development" ]; then
147+
composer install --working-dir=/var/www/html
148+
else
149+
composer install --no-dev --working-dir=/var/www/html
150+
fi
151+
fi
152+
149153
# Start supervisord and services
150154
exec /usr/bin/supervisord -n -c /etc/supervisord.conf
151155

0 commit comments

Comments
 (0)