refactor(env): update NEXT_PUBLIC_API_URL to use 'auto' for better flexibility

This commit is contained in:
Abhimanyu Saharan
2026-03-03 02:40:28 +05:30
parent 2031f8dcd8
commit 0fe61e3e08
11 changed files with 74 additions and 33 deletions

View File

@@ -12,6 +12,7 @@ POSTGRES_PASSWORD=postgres
POSTGRES_PORT=5432
# --- backend settings (see backend/.env.example for full list) ---
# For remote access, set this to your UI origin (e.g. http://<server-ip>:3000 or https://mc.example.com).
CORS_ORIGINS=http://localhost:3000
DB_AUTO_MIGRATE=true
LOG_LEVEL=INFO
@@ -22,6 +23,6 @@ LOCAL_AUTH_TOKEN=
# --- frontend settings ---
# REQUIRED: Public URL used by the browser to reach the API.
# If this is missing/blank, frontend API calls (e.g. Activity feed) will break.
# Example (local dev / compose on your machine):
NEXT_PUBLIC_API_URL=http://localhost:8000
# Use `auto` to target the same host currently serving Mission Control on port 8000.
# Example (explicit override): NEXT_PUBLIC_API_URL=https://mc.example.com
NEXT_PUBLIC_API_URL=auto