From ba82f5b168d3e70ab3011bed19b0d99ee2ba45e8 Mon Sep 17 00:00:00 2001 From: dahoud Date: Mon, 20 Oct 2025 10:36:32 +0000 Subject: [PATCH] Fix: Add .env.production with correct API_URL including /btpxpress path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The frontend now correctly points to https://api.lions.dev/btpxpress instead of just https://api.lions.dev, which fixes the communication issue between frontend and backend. This file is needed at build-time because Next.js bakes NEXT_PUBLIC_* variables into the bundle during the build process. Fixes: - Frontend can now call backend API endpoints correctly - Resolves 404 errors when making API requests - Works with Ingress rewrite-target configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .env.production | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .env.production diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..0ccf621 --- /dev/null +++ b/.env.production @@ -0,0 +1,28 @@ +# Production environment configuration for BTP Xpress Frontend +# This file is used during the Docker build process for production deployments + +# API Backend - Points to the backend via Ingress at api.lions.dev/btpxpress +NEXT_PUBLIC_API_URL=https://api.lions.dev/btpxpress + +# Keycloak Configuration +NEXT_PUBLIC_KEYCLOAK_URL=https://security.lions.dev +NEXT_PUBLIC_KEYCLOAK_REALM=btpxpress +NEXT_PUBLIC_KEYCLOAK_CLIENT_ID=btpxpress-frontend + +# Application +NEXT_PUBLIC_APP_NAME=BTP Xpress +NEXT_PUBLIC_APP_VERSION=1.0.0 +NEXT_PUBLIC_APP_DESCRIPTION=Plateforme de gestion BTP +NEXT_PUBLIC_APP_ENV=production + +# Theme +NEXT_PUBLIC_DEFAULT_THEME=blue +NEXT_PUBLIC_DEFAULT_THEME_MODE=light + +# Security +NEXT_PUBLIC_SESSION_TIMEOUT=1800 +NEXT_PUBLIC_SECURITY_STRICT_MODE=true +NEXT_PUBLIC_ENABLE_CLIENT_VALIDATION=true + +# Debug - disabled in production +NEXT_PUBLIC_DEBUG=false