docker: add optional DEMO env var
that includes the default snapshot import
This commit is contained in:
parent
665310651c
commit
b024dd1a11
|
@ -1 +1,2 @@
|
|||
DOMAIN=localhost
|
||||
DEMO=false
|
||||
|
|
|
@ -6,6 +6,7 @@ services:
|
|||
environment:
|
||||
- DEBUG=true
|
||||
- DOMAIN=${DOMAIN:-localhost}
|
||||
- DEMO=${DEMO:-n}
|
||||
volumes:
|
||||
- .:/opt/devicehub-django
|
||||
ports:
|
||||
|
|
|
@ -24,6 +24,9 @@ deploy() {
|
|||
./manage.py add_institution example-org
|
||||
# TODO: one error on add_user, and you don't add user anymore
|
||||
./manage.py add_user example-org user@example.org 1234
|
||||
if [ "${DEMO:-}" ]; then
|
||||
./manage.py up_snapshots example/snapshots/ user@example.org
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue