docker: add open_service support

This commit is contained in:
pedro 2025-01-30 13:40:53 +01:00
parent 4c28d5d7bc
commit 8ee11d8820
3 changed files with 7 additions and 0 deletions

View file

@ -9,6 +9,7 @@ DEV_DOCKER_ALWAYS_BUILD=false
IDHUB_DOMAIN=localhost
IDHUB_PORT=9001
IDHUB_DEMO=true
IDHUB_ALLOWED_HOSTS=${IDHUB_DOMAIN},${IDHUB_DOMAIN}:${IDHUB_PORT},127.0.0.1,127.0.0.1:${IDHUB_PORT}
IDHUB_TIME_ZONE='Europe/Madrid'
#IDHUB_SECRET_KEY='uncomment-it-and-fill-this'

View file

@ -9,6 +9,7 @@ services:
- DOMAIN=${IDHUB_DOMAIN:-localhost}
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-$IDHUB_DOMAIN}
- DEBUG=true
- DEMO=${IDHUB_DEMO:-}
- INITIAL_ADMIN_EMAIL=${IDHUB_ADMIN_EMAIL}
- INITIAL_ADMIN_PASSWORD=${IDHUB_ADMIN_PASSWD}
- CREATE_TEST_USERS=true

View file

@ -115,6 +115,11 @@ runserver() {
else
./manage.py runserver 0.0.0.0:${PORT}
fi
elif [ "${DEMO:-}" = 'true' ]; then
VAULT_PASSWORD="DEMO"
# open_service: automatically unlocks the vault,
# useful for debugging/dev purposes ./manage.py
./manage.py open_service "${VAULT_PASSWORD}" 0.0.0.0:${PORT}
else
./manage.py runserver 0.0.0.0:${PORT}
fi