adapt entrypoint to idhub trustchain pilot
This commit is contained in:
parent
8b4f4b2c6e
commit
b607eedf5f
|
@ -7,6 +7,7 @@ set -x
|
||||||
|
|
||||||
# 3. Generate an environment .env file.
|
# 3. Generate an environment .env file.
|
||||||
gen_env_vars() {
|
gen_env_vars() {
|
||||||
|
CONFIG_OIDC="${CONFIG_OIDC:-y}"
|
||||||
# specific dpp env vars
|
# specific dpp env vars
|
||||||
if [ "${DPP_MODULE}" = 'y' ]; then
|
if [ "${DPP_MODULE}" = 'y' ]; then
|
||||||
dpp_env_vars="$(cat <<END
|
dpp_env_vars="$(cat <<END
|
||||||
|
@ -67,7 +68,10 @@ init_data() {
|
||||||
# 11. Generate a minimal data structure.
|
# 11. Generate a minimal data structure.
|
||||||
# TODO it has some errors (?)
|
# TODO it has some errors (?)
|
||||||
flask initdata || true
|
flask initdata || true
|
||||||
#flask dlt_register_user /opt/devicehub/examples/users_devicehub.json || true
|
|
||||||
|
if [ "${EREUSE_PILOT:-}" = 'y' ]; then
|
||||||
|
flask dlt_register_user /opt/devicehub/users_devicehub.json || true
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
big_error() {
|
big_error() {
|
||||||
|
@ -165,14 +169,6 @@ config_dpp_part1() {
|
||||||
#flask dlt_register_user "${EMAIL_DEMO}" ${PASSWORD_DEMO} Operator
|
#flask dlt_register_user "${EMAIL_DEMO}" ${PASSWORD_DEMO} Operator
|
||||||
}
|
}
|
||||||
|
|
||||||
config_dpp_part2() {
|
|
||||||
# 16.
|
|
||||||
# commented because this fails with wrong DLT credentials
|
|
||||||
#flask check_install "${EMAIL_DEMO}" "${PASSWORD_DEMO}"
|
|
||||||
# 20. config server or client ID
|
|
||||||
config_oidc
|
|
||||||
}
|
|
||||||
|
|
||||||
config_phase() {
|
config_phase() {
|
||||||
init_flagfile='docker__already_configured'
|
init_flagfile='docker__already_configured'
|
||||||
if [ ! -f "${init_flagfile}" ]; then
|
if [ ! -f "${init_flagfile}" ]; then
|
||||||
|
@ -194,9 +190,12 @@ config_phase() {
|
||||||
/usr/bin/time flask snapshot "${EMAIL_DEMO}" ${PASSWORD_DEMO}
|
/usr/bin/time flask snapshot "${EMAIL_DEMO}" ${PASSWORD_DEMO}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${DPP_MODULE}" = 'y' ]; then
|
if [ "${CONFIG_OIDC}" = 'y' ]; then
|
||||||
# 16, 20
|
# 16.
|
||||||
config_dpp_part2
|
# commented because this fails with wrong DLT credentials
|
||||||
|
#flask check_install "${EMAIL_DEMO}" "${PASSWORD_DEMO}"
|
||||||
|
# 20. config server or client ID
|
||||||
|
config_oidc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# remain next command as the last operation for this if conditional
|
# remain next command as the last operation for this if conditional
|
||||||
|
|
Reference in New Issue