Skip to content

Commit

Permalink
add variables for ENKETO_URL and PYXFORM_*
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasmcnulty committed Jan 9, 2024
1 parent f24ec15 commit 8026e22
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@ services:
- EMAIL_IGNORE_TLS=${EMAIL_IGNORE_TLS:-true}
- EMAIL_USER=${EMAIL_USER:-}
- EMAIL_PASSWORD=${EMAIL_PASSWORD:-}
- ENKETO_URL=${ENKETO_URL:-http://enketo:8005/-}
- OIDC_ENABLED=${OIDC_ENABLED:-false}
- OIDC_ISSUER_URL=${OIDC_ISSUER_URL:-}
- OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-}
- OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET:-}
- PYXFORM_HOST=${PYXFORM_HOST:-pyxform}
- PYXFORM_PORT=${PYXFORM_PORT:-80}
- SENTRY_ORG_SUBDOMAIN=${SENTRY_ORG_SUBDOMAIN:-o130137}
- SENTRY_KEY=${SENTRY_KEY:-3cf75f54983e473da6bd07daddf0d2ee}
- SENTRY_PROJECT=${SENTRY_PROJECT:-1298632}
Expand Down
6 changes: 3 additions & 3 deletions files/service/config.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
}
},
"xlsform": {
"host": "pyxform",
"port": 80
"host": "${PYXFORM_HOST}",
"port": ${PYXFORM_PORT}
},
"enketo": {
"url": "http://enketo:8005/-",
"url": "${ENKETO_URL}",
"apiKey": "${ENKETO_API_KEY}"
},
"env": {
Expand Down
2 changes: 1 addition & 1 deletion files/service/scripts/start-odk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ echo "generating local service configuration.."

ENKETO_API_KEY=$(cat /etc/secrets/enketo-api-key) \
BASE_URL=$( [ "${HTTPS_PORT}" = 443 ] && echo https://"${DOMAIN}" || echo https://"${DOMAIN}":"${HTTPS_PORT}" ) \
envsubst '$DOMAIN $BASE_URL $SYSADMIN_EMAIL $ENKETO_API_KEY $DB_HOST $DB_USER $DB_PASSWORD $DB_NAME $DB_SSL $EMAIL_FROM $EMAIL_HOST $EMAIL_PORT $EMAIL_SECURE $EMAIL_IGNORE_TLS $EMAIL_USER $EMAIL_PASSWORD $OIDC_ENABLED $OIDC_ISSUER_URL $OIDC_CLIENT_ID $OIDC_CLIENT_SECRET $SENTRY_ORG_SUBDOMAIN $SENTRY_KEY $SENTRY_PROJECT' \
envsubst '$DOMAIN $BASE_URL $SYSADMIN_EMAIL $ENKETO_URL $ENKETO_API_KEY $DB_HOST $DB_USER $DB_PASSWORD $DB_NAME $DB_SSL $EMAIL_FROM $EMAIL_HOST $EMAIL_PORT $EMAIL_SECURE $EMAIL_IGNORE_TLS $EMAIL_USER $EMAIL_PASSWORD $OIDC_ENABLED $OIDC_ISSUER_URL $OIDC_CLIENT_ID $OIDC_CLIENT_SECRET $PYXFORM_HOST $PYXFORM_PORT $SENTRY_ORG_SUBDOMAIN $SENTRY_KEY $SENTRY_PROJECT' \
< /usr/share/odk/config.json.template \
> /usr/odk/config/local.json

Expand Down

0 comments on commit 8026e22

Please sign in to comment.