`VITE_BACKEND_URL=""` keeps requests relative so they use the proxy. If you set `VITE_BACKEND_URL` to a full URL, requests bypass the proxy and CORS must be configured accordingly.
## Docker Compose (Production-style)
Template files:
-`math-tutor/docker/docker-compose.yml`
-`math-tutor/docker/nginx.conf`
-`math-tutor/backend/Dockerfile`
-`math-tutor/frontend/Dockerfile`
Run:
```powershell
cdmath-tutor/docker
dockercomposeup--build-d
```
Open in browser:
-`http://<HOST>:80`
Notes:
- Nginx serves the built frontend and proxies `/api` to backend (`http://backend:8000`).
- Keep frontend API calls relative (`/api/...`) for this setup.
## Database (pgvector) setup
Ensure `POSTGRES_URL` and embedding env vars are in `backend/.env`: