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
|
DOMAIN=localhost
|
||||||
|
DEMO=false
|
||||||
|
|
|
@ -6,6 +6,7 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- DEBUG=true
|
- DEBUG=true
|
||||||
- DOMAIN=${DOMAIN:-localhost}
|
- DOMAIN=${DOMAIN:-localhost}
|
||||||
|
- DEMO=${DEMO:-n}
|
||||||
volumes:
|
volumes:
|
||||||
- .:/opt/devicehub-django
|
- .:/opt/devicehub-django
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -24,6 +24,9 @@ deploy() {
|
||||||
./manage.py add_institution example-org
|
./manage.py add_institution example-org
|
||||||
# TODO: one error on add_user, and you don't add user anymore
|
# TODO: one error on add_user, and you don't add user anymore
|
||||||
./manage.py add_user example-org user@example.org 1234
|
./manage.py add_user example-org user@example.org 1234
|
||||||
|
if [ "${DEMO:-}" ]; then
|
||||||
|
./manage.py up_snapshots example/snapshots/ user@example.org
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue