From f666accadeedac1af01c784c3830dc7ded3cbc9b Mon Sep 17 00:00:00 2001 From: Matthew White Date: Wed, 9 Aug 2023 18:25:05 -0400 Subject: [PATCH] Prefix $OIDC_ENABLED with VUE_APP_ for Vue CLI --- docker-compose.yml | 3 ++- files/prebuild/build-frontend.sh | 2 +- nginx.dockerfile | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) 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