reorder env vars in entrypoint for coherence

This commit is contained in:
pedro 2023-09-20 00:11:58 +02:00
parent f37800dcd3
commit 260ac90f86
2 changed files with 19 additions and 22 deletions

View File

@ -9,29 +9,26 @@ set -x
gen_env_vars() {
# generate config using env vars from docker
cat > .env <<END
DB_USER=${DB_USER}
DB_PASSWORD=${DB_PASSWORD}
DB_HOST=${DB_HOST}
DB_DATABASE=${DB_DATABASE}
SCHEMA=dbtest
DB_SCHEMA=dbtest
HOST=${HOST}
EMAIL_DEMO=${EMAIL_DEMO}
PASSWORD_DEMO=${PASSWORD_DEMO}
DB_USER='${DB_USER}'
DB_PASSWORD='${DB_PASSWORD}'
DB_HOST='${DB_HOST}'
DB_DATABASE='${DB_DATABASE}'
API_DLT='${API_DLT}'
API_DLT_TOKEN='${API_DLT_TOKEN}'
API_RESOLVER='${API_RESOLVER}'
ID_FEDERATED='${ID_FEDERATED}'
URL_MANUALS='${URL_MANUALS}'
HOST='${HOST}'
SCHEMA='dbtest'
DB_SCHEMA='dbtest'
EMAIL_DEMO='${EMAIL_DEMO}'
PASSWORD_DEMO='${PASSWORD_DEMO}'
JWT_PASS=${JWT_PASS}
SECRET_KEY=${SECRET_KEY}
API_DLT=${API_DLT}
API_RESOLVER=${API_RESOLVER}
API_DLT_TOKEN=${API_DLT_TOKEN}
ID_FEDERATED=${ID_FEDERATED}
OAUTH2_JWT_ENABLED=True
OAUTH2_JWT_ISS=https://authlib.org
OAUTH2_JWT_KEY=secret-key
OAUTH2_JWT_ALG=HS256
URL_MANUALS=${URL_MANUALS}
END
}

View File

@ -3,7 +3,7 @@ DB_PASSWORD='ereuse'
DB_HOST='localhost'
DB_DATABASE='devicehub'
API_DLT='http://$IP_API_DLT'
API_DLT_TOKEN=$TOKEN
API_DLT_TOKEN='$TOKEN'
API_RESOLVER='http://$IP_API_RESOLVER'
# TODO this should be guessed by DEVICEHUB_HOST, and avoid hardcode of ID_FEDERATED
ID_FEDERATED='$ID'