From 45629db10218b60ac7decbf82a1f3423388bf71c Mon Sep 17 00:00:00 2001 From: pedro Date: Wed, 27 Nov 2024 00:11:44 +0100 Subject: [PATCH] dh docker entrypoint: use appropriate new env vars --- docker/devicehub-django.entrypoint.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/docker/devicehub-django.entrypoint.sh b/docker/devicehub-django.entrypoint.sh index 593ea2e..c6736b8 100644 --- a/docker/devicehub-django.entrypoint.sh +++ b/docker/devicehub-django.entrypoint.sh @@ -28,6 +28,11 @@ wait_for_dpp_shared() { # 3. Generate an environment .env file. # TODO cargar via shared gen_env_vars() { + INIT_ORG="${INIT_ORG:-example-org}" + INIT_USER="${INIT_USER:-user@example.org}" + INIT_PASSWD="${INIT_PASSWD:-1234}" + ADMIN='True' + PREDEFINED_TOKEN="${PREDEFINED_TOKEN:-}" # specific dpp env vars if [ "${DPP_MODULE}" = 'y' ]; then # docker situation @@ -98,7 +103,8 @@ config_dpp_part1() { else # TODO when this runs more than one time per service, this is a problem, but for the docker-reset.sh workflow, that's fine # TODO put this in already_configured - ./manage.py dlt_insert_members "${DEVICEHUB_HOST}" + # TODO hardcoded http proto and port + ./manage.py dlt_insert_members "http://${DOMAIN}:8000" fi # 13. Do a rsync api resolve @@ -108,8 +114,8 @@ config_dpp_part1() { DATASET_FILE='/tmp/dataset.json' cat > "${DATASET_FILE}" <