-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is no need to explicitly list variables in envsubst #473
Comments
1 task
matthew-white
added
ops
Docker, nginx, ops to deploy Central
refactor
Improves code without altering behavior
labels
Aug 31, 2023
2 tasks
This won't work for files which contain other strings of the form $ envsubst <<< 'proxy_set_header Host $host;'
proxy_set_header Host ; Given this limitation, here are some options: double-escape dollars which should be preserved:$ envsubst <<< 'proxy_set_header Host $${W}host;'
proxy_set_header Host $host; add second conversion layer$ envsubst <<< 'host={{host}} shell=$SHELL' | sed 's/{{\([^}]*\)}}/$\1/'
host=$host shell=/bin/bash automatically generate
|
alxndrsn
pushed a commit
to alxndrsn/odk-central
that referenced
this issue
Dec 6, 2024
For nginx config, a new approach is implemented with perl. This is because unrestricted use of `envsubst` on nginx config files will replace nginx variables like $host, $request_uri with an empty string. Closes getodk#473
2 tasks
alxndrsn
pushed a commit
to alxndrsn/odk-central
that referenced
this issue
Dec 9, 2024
For nginx config, a new approach is implemented with mawk. This is allows an equivalent to `envsubst`, but: * no need to explicitly list all variables * throw error on missing variables * do not replace nginx vars like $host, $request_uri with an empty string Closes getodk#473
alxndrsn
pushed a commit
to alxndrsn/odk-central
that referenced
this issue
Dec 9, 2024
For nginx config, a new approach is implemented with mawk. This is similar to envusbst, but more ergonomic: * no need to explicitly list all variables * throw error on missing variables * do not replace nginx vars like $host, $request_uri with empty strings (in contrast to envsubst when executed without an explicit variable list) Risks: There are a couple of changes which may break existing deployments: * changing client-config.json.template * requiring all substituted variable to be defined Closes getodk#473
alxndrsn
pushed a commit
to alxndrsn/odk-central
that referenced
this issue
Dec 9, 2024
For nginx config, a new approach is implemented with mawk. This is similar to envusbst, but more ergonomic: * no need to explicitly list all variables * throw error on missing variables * do not replace nginx vars like $host, $request_uri with empty strings (in contrast to envsubst when executed without an explicit variable list) Risks: There are a couple of changes which may break existing deployments: * changing client-config.json.template * requiring all substituted variable to be defined Closes getodk#473
2 tasks
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
central/files/service/scripts/start-odk.sh
Line 7 in f09c50b
The text was updated successfully, but these errors were encountered: