API_BASE_URL env var isn't reaching Next.js in Dokploy, so the fallback
was localhost:9812. Default to the correct container hostname so it works
without any env var configuration. Local dev still overrides via API_BASE_URL.
https://claude.ai/code/session_01Xmxm2QLgFBgRJyYD6VukR6
NEXT_PUBLIC_* is baked at build time so runtime docker-compose environment
vars have no effect. Instead:
- next.config.ts rewrites /api/* -> API_BASE_URL/api/* at the server level
- api.ts uses relative paths (no env var in client bundle at all)
- docker-compose passes API_BASE_URL=http://cvfs-backend:8080 at runtime
- Dockerfile no longer needs any build args
Requests: browser -> Next.js server (/api/*) -> cvfs-backend:8080 (/api/*)
https://claude.ai/code/session_01Xmxm2QLgFBgRJyYD6VukR6