fix(web): use Docker service name as default for API proxy

This commit is contained in:
Apple
2025-11-29 17:12:03 -08:00
parent c68b81fad1
commit 4a30f6c1a9

View File

@@ -4,9 +4,12 @@ const nextConfig: NextConfig = {
output: 'standalone',
async rewrites() {
// INTERNAL_API_URL is the backend service URL (city-service)
// Used for proxying API requests from the frontend to the backend
const internalApiUrl = process.env.INTERNAL_API_URL || 'http://localhost:7001'
// For Docker network: use service name
// INTERNAL_API_URL should be set to http://daarion-city-service:7001 in docker
// Fallback to localhost for local development
const internalApiUrl = process.env.INTERNAL_API_URL || 'http://daarion-city-service:7001'
console.log('[next.config] INTERNAL_API_URL:', internalApiUrl)
return [
{