diff --git a/.env.template b/.env.template index e7aeb140..049afcd9 100644 --- a/.env.template +++ b/.env.template @@ -21,7 +21,7 @@ HTTPS_PORT=443 # DB_NAME= # Optional: configure a custom mail server -# EMAIL_NO_REPLY= +# EMAIL_FROM= # EMAIL_HOST= # EMAIL_PORT= # EMAIL_SECURE= diff --git a/docker-compose.yml b/docker-compose.yml index bd218435..8f343974 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,7 +56,7 @@ services: - DB_USER=${DB_USER:-odk} - DB_PASSWORD=${DB_PASSWORD:-odk} - DB_NAME=${DB_NAME:-odk} - - EMAIL_NO_REPLY=${EMAIL_NO_REPLY:-no-reply@${DOMAIN}} + - EMAIL_FROM=${EMAIL_FROM:-no-reply@${DOMAIN}} - EMAIL_HOST=${EMAIL_HOST:-mail} - EMAIL_PORT=${EMAIL_PORT:-25} - EMAIL_SECURE=${EMAIL_SECURE:-false} diff --git a/files/service/config.json.template b/files/service/config.json.template index a18c8d09..19123a86 100644 --- a/files/service/config.json.template +++ b/files/service/config.json.template @@ -7,7 +7,7 @@ "database": "${DB_NAME}" }, "email": { - "serviceAccount": "${EMAIL_NO_REPLY}", + "serviceAccount": "${EMAIL_FROM}", "transport": "smtp", "transportOpts": { "host": "${EMAIL_HOST}", diff --git a/files/service/scripts/start-odk.sh b/files/service/scripts/start-odk.sh index a0fe4fd8..09f549c3 100755 --- a/files/service/scripts/start-odk.sh +++ b/files/service/scripts/start-odk.sh @@ -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 $EMAIL_NO_REPLY $EMAIL_HOST $EMAIL_PORT $EMAIL_SECURE $EMAIL_IGNORE_TLS $EMAIL_USER $EMAIL_PASSWORD $SENTRY_ORG_SUBDOMAIN $SENTRY_KEY $SENTRY_PROJECT' \ +envsubst '$DOMAIN $BASE_URL $SYSADMIN_EMAIL $ENKETO_API_KEY $DB_HOST $DB_USER $DB_PASSWORD $DB_NAME $EMAIL_FROM $EMAIL_HOST $EMAIL_PORT $EMAIL_SECURE $EMAIL_IGNORE_TLS $EMAIL_USER $EMAIL_PASSWORD $SENTRY_ORG_SUBDOMAIN $SENTRY_KEY $SENTRY_PROJECT' \ < /usr/share/odk/config.json.template \ > /usr/odk/config/local.json