Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
3ff900a7
Verified
Commit
3ff900a7
authored
Feb 10, 2018
by
David Haynes
🙆
Browse files
ENV var name change
- all caps
parent
ec04d14f
Changes
2
Show whitespace changes
Inline
Side-by-side
docker-compose.yml
View file @
3ff900a7
...
...
@@ -7,7 +7,7 @@ services:
restart_policy
:
condition
:
on-failure
networks
:
-
go
net
-
go
ports
:
-
"
3306:3306"
environment
:
...
...
@@ -23,10 +23,10 @@ services:
restart_policy
:
condition
:
on-failure
networks
:
-
go
net
-
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
:
go
net
:
go
:
startup.sh
View file @
3ff900a7
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment