Frontend: API_BASE env-driven (VITE_API_BASE, default localhost:8000 so dev is unchanged); vite.config.js base from FESTIVAL4D_BASE. Prod build 'FESTIVAL4D_BASE=/festifun/ VITE_API_BASE=/festifun' serves same-origin under the prefix. Validated end-to-end via a local proxy mirroring the nginx config: app boots, media Range 206, 3D + overlays + timeline render under /festifun. deploy/: nginx location blocks (prefix strip + Range), systemd unit (uvicorn 127.0.0.1:8000, no keys on the public box), DEPLOY.md. Labels baked into the shipped DB locally so detect can't spend credits from an anonymous public endpoint. Backend suite 103 passed; default build unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
10 lines
399 B
JavaScript
10 lines
399 B
JavaScript
import { defineConfig } from "vite";
|
|
|
|
// `base` is the public path the built assets are served from.
|
|
// - local dev / root hosting: "/" (default)
|
|
// - hosted under a path prefix: "/festifun/" via FESTIVAL4D_BASE
|
|
// Pair with VITE_API_BASE (see src/state.js) so API + media requests use the same prefix.
|
|
export default defineConfig({
|
|
base: process.env.FESTIVAL4D_BASE || "/",
|
|
});
|