Jan Dittberner
977189c263
This commit updates the docker image to be based on Debian 10 Buster. The startup script waits until the database container becomes available. Needed dependencies for building the PostgreSQL driver were added to the docker image.
22 lines
466 B
Bash
Executable file
22 lines
466 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
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
|
|
|
|
echo "db is ready"
|
|
|
|
python3 manage.py compilemessages
|
|
python3 manage.py collectstatic --noinput
|
|
python3 manage.py migrate --noinput
|
|
python3 manage.py runserver 0.0.0.0:8000
|