fix(web): use Docker service name as default for API proxy
This commit is contained in:
@@ -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 [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user