docker-startup.sh 430 Bytes
Newer Older
1
#! /bin/bash
2 3
export GO_SECRET_KEY

4 5 6 7 8
until nc -z db 3306; do
    echo "waiting for database to start..."
    sleep 1
done

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

11 12
yarn build

13
python go/manage.py makemigrations
14 15
python go/manage.py makemigrations go_back
python go/manage.py makemigrations go_ahead
16 17
python go/manage.py migrate
python go/manage.py runserver 0.0.0.0:8000