idhub deployment var no longer needed
you just enable DEBUG whenever is necessary
This commit is contained in:
parent
952b659b52
commit
d53b35fff4
|
@ -69,8 +69,6 @@ DEVICEHUB_URL_MANUALS='http://localhost:4000'
|
||||||
IDHUB_TIME_ZONE='Europe/Madrid'
|
IDHUB_TIME_ZONE='Europe/Madrid'
|
||||||
#IDHUB_SECRET_KEY='uncomment-it-and-fill-this'
|
#IDHUB_SECRET_KEY='uncomment-it-and-fill-this'
|
||||||
# enable dev flags when DEVELOPMENT deployment
|
# enable dev flags when DEVELOPMENT deployment
|
||||||
IDHUB_DEPLOYMENT='DEVELOPMENT'
|
|
||||||
#IDHUB_DEPLOYMENT='PROD'
|
|
||||||
# adapt to your domain in a production/reverse proxy env
|
# adapt to your domain in a production/reverse proxy env
|
||||||
IDHUB_CSRF_TRUSTED_ORIGINS='https://idhub.example.org'
|
IDHUB_CSRF_TRUSTED_ORIGINS='https://idhub.example.org'
|
||||||
|
|
||||||
|
@ -93,7 +91,6 @@ 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__IDHUB_DEPLOYMENT='PILOTS_EARLY'
|
|
||||||
IDHUB_PILOT_TEST__ADMIN_EMAIL='idhub_admin@example.com'
|
IDHUB_PILOT_TEST__ADMIN_EMAIL='idhub_admin@example.com'
|
||||||
IDHUB_PILOT_LAFEDE__ADMIN_EMAIL='masked@example.com'
|
IDHUB_PILOT_LAFEDE__ADMIN_EMAIL='masked@example.com'
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,7 @@ services:
|
||||||
init: true
|
init: true
|
||||||
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
|
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
|
||||||
environment:
|
environment:
|
||||||
#- DEPLOYMENT=${IDHUB_PILOT_TEST__IDHUB_DEPLOYMENT}
|
- DEBUG=true
|
||||||
# temp disable 2fa login
|
|
||||||
- DEPLOYMENT=DEVELOPMENT
|
|
||||||
- ADMIN_EMAIL=${IDHUB_PILOT_TEST__ADMIN_EMAIL}
|
- ADMIN_EMAIL=${IDHUB_PILOT_TEST__ADMIN_EMAIL}
|
||||||
- CREATE_TEST_USERS=true
|
- CREATE_TEST_USERS=true
|
||||||
- ENABLE_EMAIL=false
|
- ENABLE_EMAIL=false
|
||||||
|
|
|
@ -5,9 +5,7 @@ services:
|
||||||
init: true
|
init: true
|
||||||
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
|
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
|
||||||
environment:
|
environment:
|
||||||
#- DEPLOYMENT=${IDHUB_PILOT_TEST__IDHUB_DEPLOYMENT}
|
- DEBUG=true
|
||||||
# temp disable 2fa login
|
|
||||||
- DEPLOYMENT=DEVELOPMENT
|
|
||||||
- ADMIN_EMAIL=${IDHUB_PILOT_TEST__ADMIN_EMAIL}
|
- ADMIN_EMAIL=${IDHUB_PILOT_TEST__ADMIN_EMAIL}
|
||||||
- CREATE_TEST_USERS=true
|
- CREATE_TEST_USERS=true
|
||||||
- ENABLE_EMAIL=false
|
- ENABLE_EMAIL=false
|
||||||
|
|
|
@ -5,9 +5,9 @@ services:
|
||||||
init: true
|
init: true
|
||||||
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
|
||||||
- ADMIN_EMAIL=${IDHUB_PILOT_TEST__ADMIN_EMAIL}
|
- ADMIN_EMAIL=${IDHUB_PILOT_TEST__ADMIN_EMAIL}
|
||||||
- CREATE_TEST_USERS=true
|
- CREATE_TEST_USERS=true
|
||||||
- DEPLOYMENT=PILOTS_EARLY
|
|
||||||
- SECRET_KEY=${IDHUB_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd}
|
- SECRET_KEY=${IDHUB_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd}
|
||||||
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-*}
|
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-*}
|
||||||
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
|
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
|
||||||
|
|
|
@ -6,7 +6,6 @@ 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:
|
||||||
- ADMIN_EMAIL=${IDHUB_PILOT_LAFEDE__ADMIN_EMAIL}
|
- ADMIN_EMAIL=${IDHUB_PILOT_LAFEDE__ADMIN_EMAIL}
|
||||||
- DEPLOYMENT=PILOTS_EARLY
|
|
||||||
- SECRET_KEY=${IDHUB_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd}
|
- SECRET_KEY=${IDHUB_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd}
|
||||||
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-*}
|
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-*}
|
||||||
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
|
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
|
||||||
|
|
|
@ -41,7 +41,6 @@ services:
|
||||||
init: true
|
init: true
|
||||||
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
|
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
|
||||||
environment:
|
environment:
|
||||||
- DEPLOYMENT=${IDHUB_DEPLOYMENT}
|
|
||||||
- SECRET_KEY=${IDHUB_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd}
|
- SECRET_KEY=${IDHUB_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd}
|
||||||
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-*}
|
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-*}
|
||||||
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
|
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
|
||||||
|
@ -73,7 +72,6 @@ services:
|
||||||
init: true
|
init: true
|
||||||
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
|
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
|
||||||
environment:
|
environment:
|
||||||
- DEPLOYMENT=${IDHUB_DEPLOYMENT}
|
|
||||||
- SECRET_KEY=${IDHUB_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd}
|
- SECRET_KEY=${IDHUB_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd}
|
||||||
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-*}
|
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-*}
|
||||||
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
|
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
|
||||||
|
|
|
@ -5,7 +5,6 @@ services:
|
||||||
init: true
|
init: true
|
||||||
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
|
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
|
||||||
environment:
|
environment:
|
||||||
- DEPLOYMENT=${IDHUB_DEPLOYMENT}
|
|
||||||
- SECRET_KEY=${IDHUB_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd}
|
- SECRET_KEY=${IDHUB_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd}
|
||||||
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-*}
|
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-*}
|
||||||
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
|
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
|
||||||
|
@ -37,7 +36,6 @@ services:
|
||||||
init: true
|
init: true
|
||||||
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
|
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
|
||||||
environment:
|
environment:
|
||||||
- DEPLOYMENT=${IDHUB_DEPLOYMENT}
|
|
||||||
- SECRET_KEY=${IDHUB_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd}
|
- SECRET_KEY=${IDHUB_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd}
|
||||||
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-*}
|
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-*}
|
||||||
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
|
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
|
||||||
|
|
|
@ -19,18 +19,6 @@ inject_env_vars() {
|
||||||
# related https://www.kenmuse.com/blog/avoiding-dubious-ownership-in-dev-containers/
|
# related https://www.kenmuse.com/blog/avoiding-dubious-ownership-in-dev-containers/
|
||||||
git config --global --add safe.directory "${idhub_dir}"
|
git config --global --add safe.directory "${idhub_dir}"
|
||||||
export GIT_COMMIT="$(git log --pretty=format:'%h' -n 1)"
|
export GIT_COMMIT="$(git log --pretty=format:'%h' -n 1)"
|
||||||
|
|
||||||
# enable dev flags when DEVELOPMENT deployment
|
|
||||||
case "${DEPLOYMENT}" in
|
|
||||||
DEVELOPMENT)
|
|
||||||
export DEBUG=True
|
|
||||||
export DEVELOPMENT=True
|
|
||||||
;;
|
|
||||||
PILOTS_EARLY)
|
|
||||||
export DEBUG=True
|
|
||||||
export DEVELOPMENT=False
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deployment_strategy() {
|
deployment_strategy() {
|
||||||
|
@ -45,20 +33,12 @@ deployment_strategy() {
|
||||||
echo "INFO detected NEW deployment"
|
echo "INFO detected NEW deployment"
|
||||||
./manage.py migrate
|
./manage.py migrate
|
||||||
|
|
||||||
case "${DEPLOYMENT}" in
|
printf "This is DEVELOPMENT/PILOTS_EARLY DEPLOYMENT: including demo hardcoded data\n creating initial Datas\n" >&2
|
||||||
DEVELOPMENT|PILOTS_EARLY)
|
./manage.py initial_datas
|
||||||
printf "This is DEVELOPMENT/PILOTS_EARLY DEPLOYMENT: including demo hardcoded data\n creating initial Datas\n" >&2
|
|
||||||
./manage.py initial_datas
|
|
||||||
|
|
||||||
if [ "${RESPONSE_URI:-}" ]; then
|
if [ "${RESPONSE_URI:-}" ]; then
|
||||||
config_oidc4vp
|
config_oidc4vp
|
||||||
fi
|
fi
|
||||||
;;
|
|
||||||
PROD)
|
|
||||||
printf "creating superuser \n user: ${DJANGO_SUPERUSER_USERNAME}\n password: ${DJANGO_SUPERUSER_PASSWORD}\n email: ${DJANGO_SUPERUSER_EMAIL}\n" >&2
|
|
||||||
## thanks https://stackoverflow.com/questions/6244382/how-to-automate-createsuperuser-on-django/59467533#59467533
|
|
||||||
./manage.py createsuperuser --no-input
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue