mirror of
https://github.com/pinry/pinry.git
synced 2025-11-13 08:35:41 +01:00
Refactor: Use shortter path for project location
This commit is contained in:
@@ -22,8 +22,8 @@ local_settings_file="/data/local_settings.py"
|
||||
# Create local_settings.py
|
||||
if [ ! -f "${local_settings_file}" ];
|
||||
then
|
||||
cp "/srv/www/pinry/settings/local_settings.example.py" "${local_settings_file}"
|
||||
cp "/pinry/pinry/settings/local_settings.example.py" "${local_settings_file}"
|
||||
gen_key
|
||||
sed -i "s/secret\_key\_place\_holder/${SECRET_KEY}/" "${local_settings_file}"
|
||||
ln -s "${local_settings_file}" "/srv/www/pinry/settings/local_settings.py"
|
||||
ln -s "${local_settings_file}" "/pinry/pinry/settings/local_settings.py"
|
||||
fi
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user