Add hot-reload docker-compose.dev.yml
Dev stack with live reload: Postgres + backend (hypercorn --reload, src mounted) + Vite dev server (mounted, proxies /api to the api service). vite proxy target is now env-configurable (VITE_API_TARGET, defaults localhost:5000 for host dev). README documents both compose files (dev hot-reload vs prod image). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRgehjoz7Yv8LkUfADxACm
This commit is contained in:
@@ -10,8 +10,9 @@ export default defineConfig({
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
// Dev: proxy API + health to the Quart backend on :5000.
|
||||
"/api": "http://localhost:5000",
|
||||
// Proxy /api to the Quart backend. Defaults to localhost:5000 for host dev;
|
||||
// docker-compose.dev.yml sets VITE_API_TARGET=http://api:5000.
|
||||
"/api": process.env.VITE_API_TARGET || "http://localhost:5000",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user