chore: improve production deployment flexibility

- Switch frontend from nginx to caddy for consistency with Coolify
- Make VITE_API_URL optional, auto-derive from window.location.origin/api
- Simplifies deployment by not requiring build-time API URL

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Joyce
2026-01-21 14:55:26 -05:00
parent 7fefd634f5
commit a8ec0936d4
3 changed files with 13 additions and 14 deletions

View File

@@ -1,4 +1,5 @@
const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:8000';
// Use VITE_API_URL if set at build time, otherwise derive from current origin
const API_URL = import.meta.env.VITE_API_URL || `${window.location.origin}/api`;
export interface ParticipantAPI {
id: string;