File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "oidcEnabled": $OIDC_ENABLED
3+ }
Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ server {
6767 include /usr/share/odk/nginx/common-headers.conf;
6868 add_header Cache-Control no-cache;
6969 }
70+ location /client-config.json {
71+ include /usr/share/odk/nginx/common-headers.conf;
72+ add_header Cache-Control no-cache;
73+ }
7074 location /index.html {
7175 include /usr/share/odk/nginx/common-headers.conf;
7276 add_header Cache-Control no-cache;
Original file line number Diff line number Diff line change 11#! /bin/bash -eu
22cd client
33npm clean-install --no-audit --fund=false --update-notifier=false
4- VUE_APP_OIDC_ENABLED= " $OIDC_ENABLED " npm run build
4+ npm run build
Original file line number Diff line number Diff line change 1+ #! /bin/bash -eu
2+ set -o pipefail
3+
4+ if [[ $OIDC_ENABLED != ' true' ]] && [[ $OIDC_ENABLED != ' false' ]]; then
5+ echo ' OIDC_ENABLED must be either true or false'
6+ exit 1
7+ fi
8+
9+ envsubst < files/nginx/client-config.json.template > /tmp/client-config.json
Original file line number Diff line number Diff line change @@ -3,12 +3,14 @@ FROM node:20.12.2-slim as intermediate
33RUN apt-get update \
44 && apt-get install -y --no-install-recommends \
55 git \
6+ gettext-base \
67 && rm -rf /var/lib/apt/lists/*
78
89COPY ./ ./
910RUN files/prebuild/write-version.sh
11+ RUN files/prebuild/build-frontend.sh
1012ARG OIDC_ENABLED
11- RUN OIDC_ENABLED= "$OIDC_ENABLED" files/prebuild/build-frontend .sh
13+ RUN files/prebuild/write-client-config .sh
1214
1315
1416
@@ -32,3 +34,4 @@ COPY files/nginx/*.conf* /usr/share/odk/nginx/
3234
3335COPY --from=intermediate client/dist/ /usr/share/nginx/html
3436COPY --from=intermediate /tmp/version.txt /usr/share/nginx/html
37+ COPY --from=intermediate /tmp/client-config.json /usr/share/nginx/html
You can’t perform that action at this time.
0 commit comments