startup.sh 605 Bytes
Newer Older
mdsecurity's avatar
mdsecurity committed
1 2 3 4
until nc -z db 3306; do
    echo "waiting for database to start..."
    sleep 1
done
5

6 7
cp go/settings/settings.docker.py.template go/settings/settings.py
cp go/settings/secret.docker.py.template go/settings/secret.py
8

9
export SECRET_KEY=$(dd if=/dev/urandom count=100 | tr -dc "A-Za-z0-9" | fold -w 60 | head -n1 2>/dev/null)
10 11 12
python go/manage.py flush --no-input
python go/manage.py makemigrations
python go/manage.py makemigrations go
13
python go/manage.py migrate
14
python go/manage.py createsuperuser --noinput --username=$superuser --email=$superuser$email_domain
15
python go/manage.py runserver 0.0.0.0:8000