gva/gva.sh
Jan Dittberner 0bf37d1bea Improve docker setup
Add gvaweb and gvaldap containers to docker-compose.yml. Unify most of
Dockerfile with gvaweb and gvaldap. Add empty directories for mounting
asset and media files into bind mounted docker volumes. Run application
as separate system user.
2020-03-03 13:11:46 +01:00

23 lines
527 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"
. /home/gva/gva-venv/bin/activate
cd /srv/gva/gnuviechadmin
python3 manage.py compilemessages
python3 manage.py collectstatic --noinput
python3 manage.py migrate --noinput
python3 manage.py runserver 0.0.0.0:8000