diff --git a/client b/client index 461c1037..388b4532 160000 --- a/client +++ b/client @@ -1 +1 @@ -Subproject commit 461c1037997f9fb88075b75612b83cea297ced42 +Subproject commit 388b4532f0bfeaaf8f536001a2ea8b25cbacf18e diff --git a/docker-compose.yml b/docker-compose.yml index 1f04bca5..cfb7abf8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,6 +32,7 @@ services: - /data/transfer:/data/transfer environment: - DOMAIN=${DOMAIN} + - HTTPS_PORT=${HTTPS_PORT:-443} - SYSADMIN_EMAIL=${SYSADMIN_EMAIL} command: [ "./wait-for-it.sh", "postgres:5432", "--", "./start-odk.sh" ] restart: always @@ -59,7 +60,7 @@ services: options: max-file: "30" pyxform: - image: 'ghcr.io/getodk/pyxform-http:v1.9.0' + image: 'ghcr.io/getodk/pyxform-http:v1.10.0' restart: always secrets: volumes: @@ -82,6 +83,7 @@ services: environment: - DOMAIN=${DOMAIN} - SUPPORT_EMAIL=${SYSADMIN_EMAIL} + - HTTPS_PORT=${HTTPS_PORT:-443} enketo_redis_main: image: redis:5 volumes: diff --git a/enketo.dockerfile b/enketo.dockerfile index cac54003..2c66ac2c 100644 --- a/enketo.dockerfile +++ b/enketo.dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/enketo/enketo-express:3.1.0 +FROM ghcr.io/enketo/enketo-express:4.1.0 ENV ENKETO_SRC_DIR=/srv/src/enketo_express WORKDIR ${ENKETO_SRC_DIR} diff --git a/files/enketo/config.json.template b/files/enketo/config.json.template index 790e6dcf..7c8fa829 100644 --- a/files/enketo/config.json.template +++ b/files/enketo/config.json.template @@ -8,7 +8,7 @@ "api key": "${API_KEY}", "authentication": { "type": "cookie", - "url": "https://${DOMAIN}/#/login?next={RETURNURL}" + "url": "https://${DOMAIN}:${HTTPS_PORT}/#/login?next={RETURNURL}" }, "name": "ODK Central", "server url": "" diff --git a/files/enketo/start-enketo.sh b/files/enketo/start-enketo.sh index 910c6aec..255252ab 100755 --- a/files/enketo/start-enketo.sh +++ b/files/enketo/start-enketo.sh @@ -1,6 +1,6 @@ CONFIG_PATH=${ENKETO_SRC_DIR}/config/config.json echo "generating enketo configuration.." -/bin/bash -c "SECRET=$(cat /etc/secrets/enketo-secret) LESS_SECRET=$(cat /etc/secrets/enketo-less-secret) API_KEY=$(cat /etc/secrets/enketo-api-key) envsubst '\$DOMAIN:\$SECRET:\$LESS_SECRET:\$API_KEY:\$SUPPORT_EMAIL' < ${CONFIG_PATH}.template > $CONFIG_PATH" +/bin/bash -c "SECRET=$(cat /etc/secrets/enketo-secret) LESS_SECRET=$(cat /etc/secrets/enketo-less-secret) API_KEY=$(cat /etc/secrets/enketo-api-key) envsubst '\$DOMAIN\$HTTPS_PORT:\$SECRET:\$LESS_SECRET:\$API_KEY:\$SUPPORT_EMAIL' < ${CONFIG_PATH}.template > $CONFIG_PATH" echo "starting pm2/enketo.." pm2 start --no-daemon app.js -n enketo diff --git a/files/service/config.json.template b/files/service/config.json.template index fa085a4b..d526a2a2 100644 --- a/files/service/config.json.template +++ b/files/service/config.json.template @@ -23,7 +23,7 @@ "apiKey": "${ENKETO_API_KEY}" }, "env": { - "domain": "https://${DOMAIN}", + "domain": "https://${DOMAIN}:${HTTPS_PORT}", "sysadminAccount": "${SYSADMIN_EMAIL}" }, "external": { diff --git a/files/service/scripts/start-odk.sh b/files/service/scripts/start-odk.sh index ecaa4528..d6fc0317 100755 --- a/files/service/scripts/start-odk.sh +++ b/files/service/scripts/start-odk.sh @@ -1,6 +1,6 @@ CONFIG_PATH=/usr/odk/config/local.json echo "generating local service configuration.." -/bin/bash -c "ENKETO_API_KEY=$(cat /etc/secrets/enketo-api-key) envsubst '\$DOMAIN:\$SYSADMIN_EMAIL:\$ENKETO_API_KEY' < /usr/share/odk/config.json.template > $CONFIG_PATH" +/bin/bash -c "ENKETO_API_KEY=$(cat /etc/secrets/enketo-api-key) envsubst '\$DOMAIN:\$HTTPS_PORT:\$SYSADMIN_EMAIL:\$ENKETO_API_KEY' < /usr/share/odk/config.json.template > $CONFIG_PATH" echo "running migrations.." node -e 'const { withDatabase, migrate } = require("./lib/model/migrate"); withDatabase(require("config").get("default.database"))(migrate);' diff --git a/server b/server index 367a7f57..bdc73e91 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 367a7f572d3ede411cea16d0fa1decb98e280e92 +Subproject commit bdc73e91be2529242b5518b5c16c5c559ffefec1