Skip to content

Commit

Permalink
Prefix $OIDC_ENABLED with VUE_APP_ for Vue CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-white committed Aug 9, 2023
1 parent 5ac8716 commit f666acc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ services:
nginx:
build:
context: .
args:
- OIDC_ENABLED=${OIDC_ENABLED:-false}
dockerfile: nginx.dockerfile
depends_on:
- service
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion files/prebuild/build-frontend.sh
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion nginx.dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit f666acc

Please sign in to comment.