Move the docker related content to a better folder

This commit is contained in:
Raymond Tau
2019-03-21 22:48:17 +08:00
parent f070c76417
commit 98414fa447
16 changed files with 7 additions and 7 deletions

34
docker/scripts/start.sh Normal file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
# -----------------------------------------------------------------------------
# docker-pinry /start script
#
# Will setup database and static files if they don't exist already, if they do
# just continues to run docker-pinry.
#
# Authors: Isaac Bythewood
# Updated: Aug 19th, 2014
# -----------------------------------------------------------------------------
# If static files don't exist collect them
if [ ! -d /data/static ]
then
cd /srv/www/pinry
python manage.py collectstatic --noinput
fi
# If database doesn't exist yet create it
if [ ! -f /data/production.db ]
then
cd /srv/www/pinry
python manage.py migrate --noinput --settings=pinry.settings.docker
fi
# Fix all settings after all commands are run
chown -R www-data:www-data /data
# start all process
/usr/sbin/nginx
cd /srv/www/pinry/
/scripts/_start_gunicorn.sh