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',
|
output: 'standalone',
|
||||||
|
|
||||||
async rewrites() {
|
async rewrites() {
|
||||||
// INTERNAL_API_URL is the backend service URL (city-service)
|
// For Docker network: use service name
|
||||||
// Used for proxying API requests from the frontend to the backend
|
// INTERNAL_API_URL should be set to http://daarion-city-service:7001 in docker
|
||||||
const internalApiUrl = process.env.INTERNAL_API_URL || 'http://localhost:7001'
|
// 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 [
|
return [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user