Skip to content
Snippets Groups Projects
docker-entrypoint.sh 423 B
Newer Older
#!/bin/bash

Hartung, Michael's avatar
Hartung, Michael committed
file="docker-entrypoint.lock"
# exit if entrypoint.lock exists to prevent new import of data every time docker is restarted

python3 manage.py makemigrations drugstone
python3 manage.py migrate

Hartung, Michael's avatar
Hartung, Michael committed
if ! test -f "$file"; then
    python3 manage.py createfixtures
    python3 manage.py cleanuptasks
    sh scripts/import-data.sh
Hartung, Michael's avatar
Hartung, Michael committed
    touch $file
fi

/usr/bin/supervisord -c "/etc/supervisor/conf.d/supervisord.conf"