Refactor: Use shortter path for project location

This commit is contained in:
winkidney
2019-12-19 19:51:28 +08:00
parent 77fca13edf
commit d9da2ee4f5
5 changed files with 17 additions and 18 deletions

View File

@@ -8,17 +8,18 @@
# Authors: Isaac Bythewood
# Updated: Aug 19th, 2014
# -----------------------------------------------------------------------------
PROJECT_ROOT="/pinry"
bash /scripts/bootstrap.sh
# If static files don't exist collect them
cd /srv/www/pinry
cd ${PROJECT_ROOT}
python manage.py collectstatic --noinput
# If database doesn't exist yet create it
if [ ! -f /data/production.db ]
then
cd /srv/www/pinry
cd ${PROJECT_ROOT}
python manage.py migrate --noinput --settings=pinry.settings.docker
fi
@@ -28,5 +29,5 @@ chown -R www-data:www-data /data
# start all process
/usr/sbin/nginx
cd /srv/www/pinry/
/scripts/_start_gunicorn.sh
cd ${PROJECT_ROOT}
./docker/scripts/_start_gunicorn.sh