diff --git a/docker-compose.yml b/docker-compose.yml index b6ee2917..b38b662c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -78,6 +78,8 @@ services: nginx: build: context: . + args: + - OIDC_ENABLED=${OIDC_ENABLED:-false} dockerfile: nginx.dockerfile depends_on: - service @@ -89,7 +91,6 @@ services: - SENTRY_ORG_SUBDOMAIN=${SENTRY_ORG_SUBDOMAIN:-o130137} - SENTRY_KEY=${SENTRY_KEY:-3cf75f54983e473da6bd07daddf0d2ee} - SENTRY_PROJECT=${SENTRY_PROJECT:-1298632} - - OIDC_ENABLED=${OIDC_ENABLED:-false} ports: - "${HTTP_PORT:-80}:80" - "${HTTPS_PORT:-443}:443" diff --git a/files/prebuild/build-frontend.sh b/files/prebuild/build-frontend.sh index 6122c321..041cdac6 100755 --- a/files/prebuild/build-frontend.sh +++ b/files/prebuild/build-frontend.sh @@ -1,4 +1,4 @@ #!/bin/bash -eu cd client npm clean-install --no-audit --fund=false --update-notifier=false -npm run build +VUE_APP_OIDC_ENABLED="$OIDC_ENABLED" npm run build diff --git a/nginx.dockerfile b/nginx.dockerfile index b07979d7..72b4ecd9 100644 --- a/nginx.dockerfile +++ b/nginx.dockerfile @@ -1,8 +1,9 @@ +ARG OIDC_ENABLED FROM node:18.17 as intermediate COPY ./ ./ RUN files/prebuild/write-version.sh -RUN files/prebuild/build-frontend.sh +RUN OIDC_ENABLED="$OIDC_ENABLED" files/prebuild/build-frontend.sh # when upgrading, look for upstream changes to redirector.conf # also, confirm setup-odk.sh strips out HTTP-01 ACME challenge location