8081 is the alt-HTTP port — one of the crowded defaults every proxy/dev server grabs — so it's collision-prone on a shared host. Move to 22672, a registered- range port in the sparse 20000s band, derived deterministically from the service name and recorded in architecture port-allocations.md. Updated everywhere the number appears: api bind config + default, firewalld service XML, nginx upstream, vite dev proxy, deploy workflow API_PORT, infra-setup (SELinux semanage label), and docs. Operator note: re-run script/infra-setup.sh on slartibartfast to relabel the SELinux port (22672) and ship the updated firewalld XML before the next deploy restarts the api on the new port. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016fKZzDpvjiJ9eYbPGgJvUP
21 lines
587 B
TypeScript
21 lines
587 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react-swc';
|
|
|
|
// The production API base URL is stamped at build time via VITE_API_BASE_URL (empty in
|
|
// production, where nginx serves this SPA and proxies /v1 and /health under one origin).
|
|
// In dev we proxy to the local API daemon so the browser stays same-origin.
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/v1': 'http://127.0.0.1:22672',
|
|
'/health': 'http://127.0.0.1:22672',
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: true,
|
|
},
|
|
});
|