feat(docker): add BACKEND_API_BASE_URL support for build-time routing

- Introduced ARG and ENV for BACKEND_API_BASE_URL in Dockerfile to ensure the correct API base URL is available during the build process.
- Updated next.config.mjs to include a warning about the implications of setting BACKEND_API_BASE_URL in the environment file, emphasizing its impact on multi-domain routing.
This commit is contained in:
AmirReza Jamali
2026-06-01 12:55:52 +03:30
parent f0902d7536
commit de0e31bac5
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -40,6 +40,7 @@ const nextConfig = {
// Routing is host-based so neither deploy needs a custom env. A
// `BACKEND_API_BASE_URL` env var (if set) overrides both — handy for local
// dev pointing at e.g. http://localhost:8080/admin/v1.
//! ⚠️ IMPORTANT: Adding BACKEND_API_BASE_URL to env file will break the multi-domain feature.
const override = process.env.BACKEND_API_BASE_URL;
if (override) {
return [