feat: FRO-28 Integrate Frontend Build as a seperate image (#2)

Reviewed-on: #2
Co-authored-by: Janis <janis.e.20@gmx.de>
Co-committed-by: Janis <janis.e.20@gmx.de>
This commit is contained in:
2025-12-07 21:30:59 +01:00
committed by Janis
parent 7bc6ac89f0
commit aa399bf035
6 changed files with 70 additions and 1 deletions

14
src/runtimeConfig.ts Normal file
View File

@@ -0,0 +1,14 @@
// runtimeConfig.ts
// Reads runtime configuration injected into window.__RUNTIME_CONFIG__ (created by env.js at container start)
declare global {
interface Window { __RUNTIME_CONFIG__?: { API_URL?: string } }
}
const runtime = (globalThis as any).__RUNTIME_CONFIG__ || {};
export const API_URL = runtime.API_URL || (import.meta.env.VITE_API_URL as string) || 'http://localhost:9000';
export function getApiUrl(): string {
return API_URL;
}