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.
|
||||
gen_env_vars() {
|
||||
CONFIG_OIDC="${CONFIG_OIDC:-y}"
|
||||
# specific dpp env vars
|
||||
if [ "${DPP_MODULE}" = 'y' ]; then
|
||||
dpp_env_vars="$(cat <<END
|
||||
|
@ -67,7 +68,10 @@ init_data() {
|
|||
# 11. Generate a minimal data structure.
|
||||
# TODO it has some errors (?)
|
||||
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() {
|
||||
|
@ -165,14 +169,6 @@ config_dpp_part1() {
|
|||
#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() {
|
||||
init_flagfile='docker__already_configured'
|
||||
if [ ! -f "${init_flagfile}" ]; then
|
||||
|
@ -194,9 +190,12 @@ config_phase() {
|
|||
/usr/bin/time flask snapshot "${EMAIL_DEMO}" ${PASSWORD_DEMO}
|
||||
fi
|
||||
|
||||
if [ "${DPP_MODULE}" = 'y' ]; then
|
||||
# 16, 20
|
||||
config_dpp_part2
|
||||
if [ "${CONFIG_OIDC}" = 'y' ]; then
|
||||
# 16.
|
||||
# commented because this fails with wrong DLT credentials
|
||||
#flask check_install "${EMAIL_DEMO}" "${PASSWORD_DEMO}"
|
||||
# 20. config server or client ID
|
||||
config_oidc
|
||||
fi
|
||||
|
||||
# remain next command as the last operation for this if conditional
|
||||
|
|
Reference in a new issue