From 9304db2391c7c439649182e3d4cbbc83d8d8a8fc Mon Sep 17 00:00:00 2001 From: WorkClub Automation Date: Sat, 21 Mar 2026 14:13:37 +0100 Subject: [PATCH] Fix: Add API_INTERNAL_URL to Dockerfile build stage Next.js rewrites are evaluated at build time, not runtime. The API_INTERNAL_URL was set in K8s deployment but not during the Docker build, causing fallback to localhost:5001. - Added ENV API_INTERNAL_URL=http://workclub-api:8080 - This ensures Next.js rewrites point to internal K8s service --- frontend/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 61d6e4b..0b42460 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -16,6 +16,8 @@ COPY . . # Set environment for build to ensure server binds to all interfaces ENV HOSTNAME="0.0.0.0" ENV PORT="3000" +# Set API_INTERNAL_URL for build-time Next.js rewrites evaluation +ENV API_INTERNAL_URL="http://workclub-api:8080" RUN bun run build # Stage 3: Runtime