Skip to content

Commit

Permalink
build: add defaults for FMTM_SCRIPT_DOMAIN (nginx fails)
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Nov 5, 2023
1 parent 4d77c15 commit 1ecba95
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docker-compose.development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ services:
FMTM_API_DOMAIN: ${FMTM_API_DOMAIN:-${VITE_API_URL:-api.${FMTM_DOMAIN}}}
FMTM_ODK_DOMAIN: ${FMTM_ODK_DOMAIN:-odk.${FMTM_DOMAIN}}
FMTM_S3_DOMAIN: ${FMTM_S3_DOMAIN:-s3.${FMTM_DOMAIN}}
FMTM_SCRIPT_DOMAIN: ${FMTM_SCRIPT_DOMAIN:-_}
ports:
- 80:80
- 443:443
Expand Down Expand Up @@ -256,6 +257,7 @@ services:
FMTM_API_DOMAIN: ${FMTM_API_DOMAIN:-${VITE_API_URL:-api.${FMTM_DOMAIN}}}
FMTM_ODK_DOMAIN: ${FMTM_ODK_DOMAIN:-odk.${FMTM_DOMAIN}}
FMTM_S3_DOMAIN: ${FMTM_S3_DOMAIN:-s3.${FMTM_DOMAIN}}
FMTM_SCRIPT_DOMAIN: ${FMTM_SCRIPT_DOMAIN:-_}
CERT_EMAIL: ${CERT_EMAIL}
ports:
- 80:80
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ services:
environment:
FMTM_DOMAIN: ${FMTM_DOMAIN}
FMTM_API_DOMAIN: ${VITE_API_URL:-api.${FMTM_DOMAIN}}
FMTM_SCRIPT_DOMAIN: ${FMTM_SCRIPT_DOMAIN}
FMTM_SCRIPT_DOMAIN: ${FMTM_SCRIPT_DOMAIN:-_}
ports:
- 80:80
- 443:443
Expand Down Expand Up @@ -152,7 +152,7 @@ services:
environment:
FMTM_DOMAIN: ${FMTM_DOMAIN}
FMTM_API_DOMAIN: ${FMTM_API_DOMAIN:-${VITE_API_URL:-api.${FMTM_DOMAIN}}}
FMTM_SCRIPT_DOMAIN: ${FMTM_SCRIPT_DOMAIN}
FMTM_SCRIPT_DOMAIN: ${FMTM_SCRIPT_DOMAIN:-_}
CERT_EMAIL: ${CERT_EMAIL}
ports:
- 80:80
Expand Down
2 changes: 1 addition & 1 deletion nginx/container-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ certbot --non-interactive certonly "${certbot_args[@]}"
echo "Certificate generated under: /etc/letsencrypt/live/${FMTM_DOMAIN}/"

# Add FMTM_SCRIPT_DOMAIN if present
if [ -n "${FMTM_SCRIPT_DOMAIN}" ]; then
if [ -n "${FMTM_SCRIPT_DOMAIN}" ] && [ "${FMTM_SCRIPT_DOMAIN}" != "_" ]; then
echo
echo "FMTM_SCRIPT_DOMAIN variable set. Generating separate certificate."
certbot --non-interactive certonly \
Expand Down

0 comments on commit 1ecba95

Please sign in to comment.