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
This commit is contained in:
pedro 2024-03-07 15:14:07 +01:00
parent 4983e3c89f
commit 7f1e26b071
5 changed files with 16 additions and 11 deletions

View File

@ -91,7 +91,8 @@ IDHUB_EMAIL='admin@example.org'
# by default it is set to 'y' to facilitate idhub dev when outside docker # by default it is set to 'y' to facilitate idhub dev when outside docker
IDHUB_SYNC_ORG_DEV='n' 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' IDHUB_PILOT_LAFEDE__ADMIN_EMAIL='masked@example.com'
# AUTHENTIK aka goauthentik # AUTHENTIK aka goauthentik

View File

@ -6,7 +6,8 @@ services:
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
environment: environment:
- DEBUG=true - 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 - CREATE_TEST_USERS=true
- ENABLE_EMAIL=false - ENABLE_EMAIL=false
- ENABLE_2FACTOR_AUTH=false - ENABLE_2FACTOR_AUTH=false
@ -14,7 +15,7 @@ services:
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/} - STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
- MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/} - MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/}
- PORT=${IDHUB_PORT:-9001} - PORT=${IDHUB_PORT:-9001}
- DOMAIN=idhub1-autotest.demo.pangea.org - DOMAIN=${DOMAIN:-idhub1-autotest.demo.pangea.org}
- DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL} - DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL}
- EMAIL_HOST=${IDHUB_EMAIL_HOST} - EMAIL_HOST=${IDHUB_EMAIL_HOST}
- EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER} - EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER}
@ -45,7 +46,7 @@ services:
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/} - STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
- MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/} - MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/}
- PORT=${IDHUB_PORT:-9001} - PORT=${IDHUB_PORT:-9001}
- DOMAIN=idhub2-autotest.demo.pangea.org - DOMAIN=${DOMAIN:-idhub2-autotest.demo.pangea.org}
- DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL} - DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL}
- EMAIL_HOST=${IDHUB_EMAIL_HOST} - EMAIL_HOST=${IDHUB_EMAIL_HOST}
- EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER} - EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER}

View File

@ -6,7 +6,8 @@ services:
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
environment: environment:
- DEBUG=true - 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 - CREATE_TEST_USERS=true
- ENABLE_EMAIL=false - ENABLE_EMAIL=false
- ENABLE_2FACTOR_AUTH=false - ENABLE_2FACTOR_AUTH=false
@ -14,7 +15,7 @@ services:
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/} - STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
- MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/} - MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/}
- PORT=${IDHUB_PORT:-9001} - PORT=${IDHUB_PORT:-9001}
- DOMAIN=idhub-autotest.demo.pangea.org - DOMAIN=${DOMAIN:-idhub-autotest.demo.pangea.org}
- DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL} - DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL}
- EMAIL_HOST=${IDHUB_EMAIL_HOST} - EMAIL_HOST=${IDHUB_EMAIL_HOST}
- EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER} - EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER}

View File

@ -6,7 +6,8 @@ services:
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
environment: environment:
- DEBUG=true - 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 - CREATE_TEST_USERS=true
- ENABLE_EMAIL=false - ENABLE_EMAIL=false
- ENABLE_2FACTOR_AUTH=false - ENABLE_2FACTOR_AUTH=false
@ -14,7 +15,7 @@ services:
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/} - STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
- MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/} - MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/}
- PORT=${IDHUB_PORT:-9001} - PORT=${IDHUB_PORT:-9001}
- DOMAIN=idhub1-nightly.demo.pangea.org - DOMAIN=${DOMAIN:-idhub1-nightly.demo.pangea.org}
- DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL} - DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL}
- EMAIL_HOST=${IDHUB_EMAIL_HOST} - EMAIL_HOST=${IDHUB_EMAIL_HOST}
- EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER} - EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER}
@ -45,7 +46,7 @@ services:
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/} - STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
- MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/} - MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/}
- PORT=${IDHUB_PORT:-9001} - PORT=${IDHUB_PORT:-9001}
- DOMAIN=idhub2-nightly.demo.pangea.org - DOMAIN=${DOMAIN:-idhub2-nightly.demo.pangea.org}
- DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL} - DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL}
- EMAIL_HOST=${IDHUB_EMAIL_HOST} - EMAIL_HOST=${IDHUB_EMAIL_HOST}
- EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER} - EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER}

View File

@ -6,7 +6,8 @@ services:
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
environment: environment:
- DEBUG=true - 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 - CREATE_TEST_USERS=true
- ENABLE_EMAIL=false - ENABLE_EMAIL=false
- ENABLE_2FACTOR_AUTH=false - ENABLE_2FACTOR_AUTH=false
@ -14,7 +15,7 @@ services:
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/} - STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
- MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/} - MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/}
- PORT=${IDHUB_PORT:-9001} - PORT=${IDHUB_PORT:-9001}
- DOMAIN=idhub-nightly.demo.pangea.org - DOMAIN=${DOMAIN:-idhub-nightly.demo.pangea.org}
- DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL} - DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL}
- EMAIL_HOST=${IDHUB_EMAIL_HOST} - EMAIL_HOST=${IDHUB_EMAIL_HOST}
- EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER} - EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER}