Fix running composer with respect to different WEBROOT.
The composer configuration should always be located in the project root, independently where the webroot is located. Closes #95.
This commit is contained in:
@@ -11,8 +11,8 @@ if [ -z "$GIT_NAME" ]; then
|
||||
fi
|
||||
|
||||
# Try auto install for composer
|
||||
if [ -f "$WEBROOT/composer.lock" ]; then
|
||||
php composer.phar install --no-dev
|
||||
if [ -f "/var/www/html/composer.lock" ]; then
|
||||
composer install --no-dev --working-dir=/var/www/html
|
||||
fi
|
||||
|
||||
cd /var/www/html
|
||||
|
||||
@@ -17,10 +17,7 @@ fi
|
||||
|
||||
# Set custom webroot
|
||||
if [ ! -z "$WEBROOT" ]; then
|
||||
webroot=$WEBROOT
|
||||
sed -i "s#root /var/www/html;#root ${webroot};#g" /etc/nginx/sites-available/default.conf
|
||||
else
|
||||
webroot=/var/www/html
|
||||
sed -i "s#root /var/www/html;#root ${WEBROOT};#g" /etc/nginx/sites-available/default.conf
|
||||
fi
|
||||
|
||||
# Setup git variables
|
||||
@@ -62,8 +59,8 @@ if [ ! -d "/var/www/html/.git" ]; then
|
||||
fi
|
||||
|
||||
# Try auto install for composer
|
||||
if [ -f "$WEBROOT/composer.lock" ]; then
|
||||
php composer.phar install --no-dev
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user