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:
|
||||
name: ${STACK_NAME}_custom_entrypoint_${CUSTOM_ENTRYPOINT_VERSION}
|
||||
file: entrypoint.sh.tmpl
|
||||
template_driver: golang
|
||||
|
||||
secrets:
|
||||
admin_password:
|
||||
|
|
|
@ -11,15 +11,12 @@ file_env() {
|
|||
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local val="$def"
|
||||
|
||||
if [ "${!var:-}" ]; then
|
||||
val="${!var}"
|
||||
elif [ "${!fileVar:-}" ]; then
|
||||
val="$(< "${!fileVar}")"
|
||||
fi
|
||||
|
||||
export "$var"="$val"
|
||||
unset "$fileVar"
|
||||
}
|
||||
|
@ -27,9 +24,9 @@ file_env() {
|
|||
file_env "PASSWORD"
|
||||
|
||||
{{ if eq (env "OIDC_ENABLED") "1" }}
|
||||
echo "auth-openid=1" >> /etc/rstudio/rserver.conf
|
||||
echo "auth-openid-issuer=${OIDC_ISSUER_URL}" >> /etc/rstudio/rserver.conf
|
||||
echo "auth-openid-base-uri=https://${DOMAIN}" >> /etc/rstudio/rserver.conf
|
||||
echo 'auth-openid=1' >> /etc/rstudio/rserver.conf
|
||||
echo 'auth-openid-issuer={{ env "OIDC_ISSUER_URL"}}' >> /etc/rstudio/rserver.conf
|
||||
echo 'auth-openid-base-uri=https://{{ env "DOMAIN" }}' >> /etc/rstudio/rserver.conf
|
||||
{{ end }}
|
||||
|
||||
exec "$@"
|
||||
|
|
Loading…
Reference in New Issue