From 7f1e26b071826807ed8f476f1d8452a0cc6dff47 Mon Sep 17 00:00:00 2001 From: pedro Date: Thu, 7 Mar 2024 15:14:07 +0100 Subject: [PATCH] refactor var: ADMIN -> INITIAL_ADMIN, dyn DOMAIN - specify clearly the ADMIN vars are when initialization, also add the password - also allow override of domain for test instances --- .env.example | 3 ++- docker-compose__instance-autotest-pair.yml | 7 ++++--- docker-compose__instance-autotest.yml | 5 +++-- docker-compose__instance-nightly-pair.yml | 7 ++++--- docker-compose__instance-nightly.yml | 5 +++-- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.env.example b/.env.example index f658ce6..2d9039a 100644 --- a/.env.example +++ b/.env.example @@ -91,7 +91,8 @@ IDHUB_EMAIL='admin@example.org' # by default it is set to 'y' to facilitate idhub dev when outside docker IDHUB_SYNC_ORG_DEV='n' -IDHUB_PILOT_TEST__ADMIN_EMAIL='idhub_admin@example.com' +IDHUB_PILOT_TEST__ADMIN_EMAIL='admin@example.com' +IDHUB_PILOT_TEST__ADMIN_PASSWORD='1234' IDHUB_PILOT_LAFEDE__ADMIN_EMAIL='masked@example.com' # AUTHENTIK aka goauthentik diff --git a/docker-compose__instance-autotest-pair.yml b/docker-compose__instance-autotest-pair.yml index 9a10d77..6899638 100644 --- a/docker-compose__instance-autotest-pair.yml +++ b/docker-compose__instance-autotest-pair.yml @@ -6,7 +6,8 @@ services: image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest environment: - DEBUG=true - - ADMIN_EMAIL=${IDHUB_PILOT_TEST__ADMIN_EMAIL} + - INITIAL_ADMIN_EMAIL=${IDHUB_PILOT_TEST__ADMIN_EMAIL} + - INITIAL_ADMIN_PASSWORD=${IDHUB_PILOT_TEST__ADMIN_PASSWORD} - CREATE_TEST_USERS=true - ENABLE_EMAIL=false - ENABLE_2FACTOR_AUTH=false @@ -14,7 +15,7 @@ services: - STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/} - MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/} - PORT=${IDHUB_PORT:-9001} - - DOMAIN=idhub1-autotest.demo.pangea.org + - DOMAIN=${DOMAIN:-idhub1-autotest.demo.pangea.org} - DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL} - EMAIL_HOST=${IDHUB_EMAIL_HOST} - EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER} @@ -45,7 +46,7 @@ services: - STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/} - MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/} - PORT=${IDHUB_PORT:-9001} - - DOMAIN=idhub2-autotest.demo.pangea.org + - DOMAIN=${DOMAIN:-idhub2-autotest.demo.pangea.org} - DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL} - EMAIL_HOST=${IDHUB_EMAIL_HOST} - EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER} diff --git a/docker-compose__instance-autotest.yml b/docker-compose__instance-autotest.yml index 533b9b2..1e0a303 100644 --- a/docker-compose__instance-autotest.yml +++ b/docker-compose__instance-autotest.yml @@ -6,7 +6,8 @@ services: image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest environment: - DEBUG=true - - ADMIN_EMAIL=${IDHUB_PILOT_TEST__ADMIN_EMAIL} + - INITIAL_ADMIN_EMAIL=${IDHUB_PILOT_TEST__ADMIN_EMAIL} + - INITIAL_ADMIN_PASSWORD=${IDHUB_PILOT_TEST__ADMIN_PASSWORD} - CREATE_TEST_USERS=true - ENABLE_EMAIL=false - ENABLE_2FACTOR_AUTH=false @@ -14,7 +15,7 @@ services: - STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/} - MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/} - PORT=${IDHUB_PORT:-9001} - - DOMAIN=idhub-autotest.demo.pangea.org + - DOMAIN=${DOMAIN:-idhub-autotest.demo.pangea.org} - DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL} - EMAIL_HOST=${IDHUB_EMAIL_HOST} - EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER} diff --git a/docker-compose__instance-nightly-pair.yml b/docker-compose__instance-nightly-pair.yml index df31334..fa8c155 100644 --- a/docker-compose__instance-nightly-pair.yml +++ b/docker-compose__instance-nightly-pair.yml @@ -6,7 +6,8 @@ services: image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest environment: - DEBUG=true - - ADMIN_EMAIL=${IDHUB_PILOT_TEST__ADMIN_EMAIL} + - INITIAL_ADMIN_EMAIL=${IDHUB_PILOT_TEST__ADMIN_EMAIL} + - INITIAL_ADMIN_PASSWORD=${IDHUB_PILOT_TEST__ADMIN_PASSWORD} - CREATE_TEST_USERS=true - ENABLE_EMAIL=false - ENABLE_2FACTOR_AUTH=false @@ -14,7 +15,7 @@ services: - STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/} - MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/} - PORT=${IDHUB_PORT:-9001} - - DOMAIN=idhub1-nightly.demo.pangea.org + - DOMAIN=${DOMAIN:-idhub1-nightly.demo.pangea.org} - DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL} - EMAIL_HOST=${IDHUB_EMAIL_HOST} - EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER} @@ -45,7 +46,7 @@ services: - STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/} - MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/} - PORT=${IDHUB_PORT:-9001} - - DOMAIN=idhub2-nightly.demo.pangea.org + - DOMAIN=${DOMAIN:-idhub2-nightly.demo.pangea.org} - DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL} - EMAIL_HOST=${IDHUB_EMAIL_HOST} - EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER} diff --git a/docker-compose__instance-nightly.yml b/docker-compose__instance-nightly.yml index fbe4887..0233f8f 100644 --- a/docker-compose__instance-nightly.yml +++ b/docker-compose__instance-nightly.yml @@ -6,7 +6,8 @@ services: image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest environment: - DEBUG=true - - ADMIN_EMAIL=${IDHUB_PILOT_TEST__ADMIN_EMAIL} + - INITIAL_ADMIN_EMAIL=${IDHUB_PILOT_TEST__ADMIN_EMAIL} + - INITIAL_ADMIN_PASSWORD=${IDHUB_PILOT_TEST__ADMIN_PASSWORD} - CREATE_TEST_USERS=true - ENABLE_EMAIL=false - ENABLE_2FACTOR_AUTH=false @@ -14,7 +15,7 @@ services: - STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/} - MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/} - PORT=${IDHUB_PORT:-9001} - - DOMAIN=idhub-nightly.demo.pangea.org + - DOMAIN=${DOMAIN:-idhub-nightly.demo.pangea.org} - DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL} - EMAIL_HOST=${IDHUB_EMAIL_HOST} - EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER}