From dbaf06298e6bf6285bea2487654bc81fe4250c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A8r=20Kessels?= Date: Tue, 16 Jul 2024 11:26:59 +0200 Subject: [PATCH] fix: Make ENV var needed for next.config.mjs available during docker build Frontend docker compose build would fail with: ``` 12.13 `destination` does not start with `/`, `http://`, or `https://` for route {"source":"/.well-known/jwks/:path*","destination":"undefined/.well-known/jwks/:path*"} 12.13 12.13 12.13 Error: Invalid rewrite found ``` This fixes that. --- docker/wallet-frontend-only/Dockerfile | 2 ++ docker/wallet-frontend-only/docker-compose.frontend-only.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/docker/wallet-frontend-only/Dockerfile b/docker/wallet-frontend-only/Dockerfile index efddeec..64b03b9 100644 --- a/docker/wallet-frontend-only/Dockerfile +++ b/docker/wallet-frontend-only/Dockerfile @@ -5,6 +5,8 @@ RUN pnpm add typescript tslib WORKDIR /opt/wallet/frontend COPY . . + +ARG NEXT_PUBLIC_AGENT_BASE_URL RUN pnpm install -r RUN pnpm build diff --git a/docker/wallet-frontend-only/docker-compose.frontend-only.yml b/docker/wallet-frontend-only/docker-compose.frontend-only.yml index c9b9292..39d4091 100644 --- a/docker/wallet-frontend-only/docker-compose.frontend-only.yml +++ b/docker/wallet-frontend-only/docker-compose.frontend-only.yml @@ -14,5 +14,6 @@ services: args: progress: plain no-cache: true + NEXT_PUBLIC_AGENT_BASE_URL: ports: - "3001:3001"