feat: unify on single repo-root compose file for dev and prod
Some checks failed
/ test (push) Has been cancelled
/ build (push) Has been cancelled
/ validate (push) Has been cancelled

This commit is contained in:
Jonas Miederer 2026-09-07 19:46:17 +00:00
parent 9acdbaa453
commit af993bd43f
18 changed files with 253 additions and 229 deletions

View file

@ -1,13 +1,15 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// Both dev server and preview proxy /api to the backend service.
// `api` is the compose service name, identical in dev and prod.
export default defineConfig({
plugins: [react()],
server: {
port: 3000,
proxy: {
"/api": {
target: "http://localhost:8000",
target: "http://api:8000",
changeOrigin: true,
},
},
@ -16,8 +18,7 @@ export default defineConfig({
port: 3000,
proxy: {
"/api": {
// Overridable at container start (prod compose: http://app:8000).
target: process.env.VITE_API_PROXY_TARGET ?? "http://localhost:8000",
target: "http://api:8000",
changeOrigin: true,
},
},