Fix: Add API_INTERNAL_URL to Dockerfile build stage
CI Pipeline / Backend Build & Test (push) Successful in 59s
CI Pipeline / Frontend Lint, Test & Build (push) Successful in 30s
CI Pipeline / Infrastructure Validation (push) Successful in 3s

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
This commit is contained in:
WorkClub Automation
2026-03-21 14:13:37 +01:00
parent 27f1ad5780
commit 9304db2391
+2
View File
@@ -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