generated from coop-cloud/example
Use template parser and quote correctly
This commit is contained in:
parent
c13aa2c715
commit
833edf2dc5
|
@ -43,6 +43,7 @@ configs:
|
||||||
custom_entrypoint:
|
custom_entrypoint:
|
||||||
name: ${STACK_NAME}_custom_entrypoint_${CUSTOM_ENTRYPOINT_VERSION}
|
name: ${STACK_NAME}_custom_entrypoint_${CUSTOM_ENTRYPOINT_VERSION}
|
||||||
file: entrypoint.sh.tmpl
|
file: entrypoint.sh.tmpl
|
||||||
|
template_driver: golang
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
admin_password:
|
admin_password:
|
||||||
|
|
|
@ -11,15 +11,12 @@ file_env() {
|
||||||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local val="$def"
|
local val="$def"
|
||||||
|
|
||||||
if [ "${!var:-}" ]; then
|
if [ "${!var:-}" ]; then
|
||||||
val="${!var}"
|
val="${!var}"
|
||||||
elif [ "${!fileVar:-}" ]; then
|
elif [ "${!fileVar:-}" ]; then
|
||||||
val="$(< "${!fileVar}")"
|
val="$(< "${!fileVar}")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export "$var"="$val"
|
export "$var"="$val"
|
||||||
unset "$fileVar"
|
unset "$fileVar"
|
||||||
}
|
}
|
||||||
|
@ -27,9 +24,9 @@ file_env() {
|
||||||
file_env "PASSWORD"
|
file_env "PASSWORD"
|
||||||
|
|
||||||
{{ if eq (env "OIDC_ENABLED") "1" }}
|
{{ if eq (env "OIDC_ENABLED") "1" }}
|
||||||
echo "auth-openid=1" >> /etc/rstudio/rserver.conf
|
echo 'auth-openid=1' >> /etc/rstudio/rserver.conf
|
||||||
echo "auth-openid-issuer=${OIDC_ISSUER_URL}" >> /etc/rstudio/rserver.conf
|
echo 'auth-openid-issuer={{ env "OIDC_ISSUER_URL"}}' >> /etc/rstudio/rserver.conf
|
||||||
echo "auth-openid-base-uri=https://${DOMAIN}" >> /etc/rstudio/rserver.conf
|
echo 'auth-openid-base-uri=https://{{ env "DOMAIN" }}' >> /etc/rstudio/rserver.conf
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|
Loading…
Reference in New Issue