22 lines
1.1 KiB
Plaintext
22 lines
1.1 KiB
Plaintext
# Build profile for a bundle that is served by the FastAPI backend itself.
|
|
#
|
|
# Use it with: npm run build:unified
|
|
#
|
|
# Why this file exists: `npm run build` loads .env.production, which pins
|
|
# VITE_API_BASE_URL to https://mcp.nearle.ai.in. That is correct for the
|
|
# deployed site (served from catalogue.nearle.ai.in, calling the API on its
|
|
# own subdomain) but wrong for every local build, because backend/app/main.py
|
|
# serves frontend/dist automatically whenever it exists. Opening
|
|
# http://localhost:8000 then loads a bundle that sends /api/auth/login to the
|
|
# remote host instead of the backend sitting on the same port - so logging in
|
|
# with the local admin credentials fails with "Could not reach the API",
|
|
# which reads like the backend being down when it is running fine.
|
|
#
|
|
# Blank means requests stay relative ("/api/..."), i.e. same-origin, so they
|
|
# land on whichever server delivered the page. That is exactly what the
|
|
# single-port unified deployment needs, and it needs no CORS entry at all.
|
|
#
|
|
# Same value and same reasoning as .env.development; separate file because
|
|
# Vite only loads .env.development in dev mode, never during a build.
|
|
VITE_API_BASE_URL=
|