2018-11-19 23:28:40 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2019-07-05 21:23:24 +02:00
|
|
|
DB_HOST="${GVA_PGSQL_HOST:-db}"
|
|
|
|
DB_PORT="${GVA_PGSQL_PORT:-5432}"
|
|
|
|
DB_USER="${GVA_PGSQL_USER:-gnuviechadmin}"
|
|
|
|
DB_NAME="${GVA_PGSQL_DATABASE:-gnuviechadmin}"
|
|
|
|
|
|
|
|
until pg_isready -q -h "${DB_HOST}" -p "${DB_PORT}" -U "${PG_USER}" -d "${DB_NAME}"
|
|
|
|
do
|
|
|
|
echo -n "."
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
|
2020-03-03 13:10:09 +01:00
|
|
|
echo " db is ready"
|
2019-07-05 21:23:24 +02:00
|
|
|
|
2020-03-03 13:10:09 +01:00
|
|
|
. /home/gva/gva-venv/bin/activate
|
|
|
|
cd /srv/gva/gnuviechadmin
|
2018-11-19 23:28:40 +01:00
|
|
|
python3 manage.py compilemessages
|
|
|
|
python3 manage.py collectstatic --noinput
|
|
|
|
python3 manage.py migrate --noinput
|
|
|
|
python3 manage.py runserver 0.0.0.0:8000
|