Skip to content

Commit 27bb674

Browse files
committed
Fix replace-environment-variables.sh to work with new Next version
1 parent 559b8d1 commit 27bb674

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ COPY ./ui/tsconfig.json ./ui/next.config.js ./ui/tailwind.config.js ./ui/postcss
1111
COPY ./test-db-manager/rollup.config.mjs ./test-db-manager/tsconfig.json ./test-db-manager/
1212

1313
ARG NEXT_PUBLIC_GIT_HASH=unknown
14+
ENV NEXT_PUBLIC_DIGITRANSIT_API_KEY="DIGITRANSIT_API_KEY_PLACEHOLDER"
1415
RUN yarn ws:db run build
1516
RUN yarn ws:ui run build
1617

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
if [ -n "$NEXT_PUBLIC_DIGITRANSIT_API_KEY" ]; then
3-
sed -i -e "s/[[:alnum:]_\$]\+\.env\.NEXT_PUBLIC_DIGITRANSIT_API_KEY/\"$NEXT_PUBLIC_DIGITRANSIT_API_KEY\"/g" /usr/share/nginx/html/_next/static/chunks/pages/*.js
3+
sed -i -e "s|DIGITRANSIT_API_KEY_PLACEHOLDER|${NEXT_PUBLIC_DIGITRANSIT_API_KEY}|g" /usr/share/nginx/html/_next/static/chunks/*.js
44
fi

0 commit comments

Comments
 (0)