Commit 3ff900a7 authored by David Haynes's avatar David Haynes 🙆

ENV var name change

- all caps
parent ec04d14f
......@@ -7,7 +7,7 @@ services:
restart_policy:
condition: on-failure
networks:
- gonet
- go
ports:
- "3306:3306"
environment:
......@@ -23,10 +23,10 @@ services:
restart_policy:
condition: on-failure
networks:
- gonet
- go
ports:
- '8000:8000'
command: /bin/bash ./startup.sh
command: ./startup.sh
volumes:
- .:/go
depends_on:
......@@ -46,7 +46,7 @@ services:
- GO_EMAIL_HOST_PASSWORD=
- GO_EMAIL_FROM=
- GO_EMAIL_TO=
- superuser=dhaynes3
- SUPERUSER=dhaynes3
networks:
gonet:
go:
......@@ -5,11 +5,13 @@ until nc -z db 3306; do
sleep 1
done
export 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 flush --no-input
export GO_SECRET_KEY
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
python go/manage.py makemigrations go
python go/manage.py migrate
python go/manage.py createsuperuser --noinput --username=$superuser --email=$superuser$GO_EMAIL_DOMAIN
python go/manage.py createsuperuser --noinput --username=$"SUPERUSER" --email=$"SUPERUSER"$"GO_EMAIL_DOMAIN"
echo "from django.contrib.auth import get_user_model; User = get_user_model(); me = User.objects.get(username='$superuser'); me.first_name = 'David'; me.last_name = 'Haynes'; me.save(); " | python go/manage.py shell
python go/manage.py runserver 0.0.0.0:8000
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment