docs: per-tenant frontend deploy paths in runbook
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Ramaiah and Global now have separate frontend dirs on EC2
(frontend-ramaiah, frontend-global) with tenant-specific VITE_API_URL
baked at build time. Also updated api-client.ts to fallback to
window.location.origin when VITE_API_URL is empty.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-21 10:50:51 +05:30
parent cfe9e0bb77
commit d36086f6da
2 changed files with 21 additions and 4 deletions

View File

@@ -1,6 +1,9 @@
import { notify } from './toast';
const API_URL = import.meta.env.VITE_API_URL ?? 'http://localhost:4100';
// In production, use the current origin — Caddy routes /api/* to the
// correct per-tenant sidecar based on hostname. Only use VITE_API_URL
// for local dev (pointing to a specific sidecar).
const API_URL = import.meta.env.VITE_API_URL || window.location.origin;
class AuthError extends Error {
constructor(message = 'Authentication required') {