Verified Commit 3ff900a7 authored by David Haynes's avatar David Haynes 🙆
Browse files

ENV var name change

- all caps
parent ec04d14f
...@@ -7,7 +7,7 @@ services: ...@@ -7,7 +7,7 @@ services:
restart_policy: restart_policy:
condition: on-failure condition: on-failure
networks: networks:
- gonet - go
ports: ports:
- "3306:3306" - "3306:3306"
environment: environment:
...@@ -23,10 +23,10 @@ services: ...@@ -23,10 +23,10 @@ services:
restart_policy: restart_policy:
condition: on-failure condition: on-failure
networks: networks:
- gonet - go
ports: ports:
- '8000:8000' - '8000:8000'
command: /bin/bash ./startup.sh command: ./startup.sh
volumes: volumes:
- .:/go - .:/go
depends_on: depends_on:
...@@ -46,7 +46,7 @@ services: ...@@ -46,7 +46,7 @@ services:
- GO_EMAIL_HOST_PASSWORD= - GO_EMAIL_HOST_PASSWORD=
- GO_EMAIL_FROM= - GO_EMAIL_FROM=
- GO_EMAIL_TO= - GO_EMAIL_TO=
- superuser=dhaynes3 - SUPERUSER=dhaynes3
networks: networks:
gonet: go:
...@@ -5,11 +5,13 @@ until nc -z db 3306; do ...@@ -5,11 +5,13 @@ until nc -z db 3306; do
sleep 1 sleep 1
done 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) export GO_SECRET_KEY
# python go/manage.py flush --no-input
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
python go/manage.py makemigrations go python go/manage.py makemigrations go
python go/manage.py migrate 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 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 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