docker-startup.sh 446 Bytes
Newer Older
1
#! /bin/bash
2 3 4 5 6
until nc -z db 3306; do
    echo "waiting for database to start..."
    sleep 1
done

7 8 9 10 11 12
export GO_SECRET_KEY
export GO_CREATE_SUPERUSER

GO_SECRET_KEY=$(dd if=/dev/urandom count=100 | tr -dc "A-Za-z0-9" | fold -w 60 | head -n1 2>/dev/null)

python go/manage.py makemigrations
13 14
python go/manage.py makemigrations go_back
python go/manage.py makemigrations go_ahead
15 16
python go/manage.py migrate
python go/manage.py runserver 0.0.0.0:8000
David Haynes's avatar
David Haynes committed
17