Skip to content

Commit

Permalink
Merge pull request #286 from getodk/release
Browse files Browse the repository at this point in the history
Release v1.5
  • Loading branch information
matthew-white authored Jun 3, 2022
2 parents cd751d7 + 3455bd9 commit 24b4ee2
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion client
Submodule client updated 363 files
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -82,6 +83,7 @@ services:
environment:
- DOMAIN=${DOMAIN}
- SUPPORT_EMAIL=${SYSADMIN_EMAIL}
- HTTPS_PORT=${HTTPS_PORT:-443}
enketo_redis_main:
image: redis:5
volumes:
Expand Down
2 changes: 1 addition & 1 deletion enketo.dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
2 changes: 1 addition & 1 deletion files/enketo/config.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""
Expand Down
2 changes: 1 addition & 1 deletion files/enketo/start-enketo.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion files/service/config.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"apiKey": "${ENKETO_API_KEY}"
},
"env": {
"domain": "https://${DOMAIN}",
"domain": "https://${DOMAIN}:${HTTPS_PORT}",
"sysadminAccount": "${SYSADMIN_EMAIL}"
},
"external": {
Expand Down
2 changes: 1 addition & 1 deletion files/service/scripts/start-odk.sh
Original file line number Diff line number Diff line change
@@ -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);'
Expand Down

0 comments on commit 24b4ee2

Please sign in to comment.