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}"
|
|
|
|
|
2023-02-19 17:48:25 +01:00
|
|
|
until pg_isready -q -h "${DB_HOST}" -p "${DB_PORT}" -U "${DB_USER}" -d "${DB_NAME}"
|
2019-07-05 21:23:24 +02:00
|
|
|
do
|
2023-02-19 17:48:25 +01:00
|
|
|
# shellcheck disable=SC2039
|
2019-07-05 21:23:24 +02:00
|
|
|
echo -n "."
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
|
2023-02-20 15:39:14 +01:00
|
|
|
echo ". db is ready"
|
|
|
|
|
|
|
|
export TZ="Europe/Berlin"
|
2019-07-05 21:23:24 +02:00
|
|
|
|
2023-02-19 15:53:00 +01:00
|
|
|
. /srv/gva/.venv/bin/activate
|
2020-03-03 13:10:09 +01:00
|
|
|
cd /srv/gva/gnuviechadmin
|
2018-11-19 23:28:40 +01:00
|
|
|
python3 manage.py collectstatic --noinput
|
|
|
|
python3 manage.py migrate --noinput
|
|
|
|
python3 manage.py runserver 0.0.0.0:8000
|