Configure Vite dev proxy via VITE_BACKEND_URL

This commit is contained in:
2026-04-22 20:21:20 +02:00
parent 1d41822a36
commit 1bf0645c04
4 changed files with 11 additions and 5 deletions

View File

@@ -135,9 +135,13 @@ frontend/
```
> **Dev proxy target:** `vite.config.ts` proxies all `/api` requests to
> `http://backend:8000`. Use the compose **service name** (`backend`), not
> `localhost` — inside the container network `localhost` resolves to the
> frontend container itself and causes `ECONNREFUSED`.
> `http://backend:8000` by default. Set `VITE_BACKEND_URL` in `frontend/.env`
> or your shell to override the backend address for local development outside
> Docker.
>
> Use the compose **service name** (`backend`), not `localhost` — inside the
> container network `localhost` resolves to the frontend container itself and
> causes `ECONNREFUSED`.
### Separation of Concerns