Files
nginx-php-fpm/scripts/pull
Sven Koschnicke 7f2ff02904 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.
2017-03-20 13:05:41 +01:00

21 lines
467 B
Bash
Executable File

#!/bin/bash
if [ -z "$GIT_EMAIL" ]; then
echo "You need to pass the \$GIT_EMAIL variable to the container for this to work"
exit
fi
if [ -z "$GIT_NAME" ]; then
echo "You need to pass the \$GIT_NAME variable to the container for this to work"
exit
fi
# Try auto install for composer
if [ -f "/var/www/html/composer.lock" ]; then
composer install --no-dev --working-dir=/var/www/html
fi
cd /var/www/html
git pull || exit 1
chown -Rf nginx:nginx /var/www/html