diff --git a/frontend/src/services/api.js b/frontend/src/services/api.js index bd6f582..8bf2c87 100644 --- a/frontend/src/services/api.js +++ b/frontend/src/services/api.js @@ -1,4 +1,4 @@ -const API_BASE = window?.ENV?.API_BASE || ''; +const API_BASE = import.meta.env.VITE_API_BASE; export async function fetchDiagram() { const res = await fetch(`${API_BASE}/diagram/fetch`); diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 2328e17..3bfc351 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -1,7 +1,6 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react-swc' - -// https://vite.dev/config/ export default defineConfig({ plugins: [react()], -}) + define: { + 'import.meta.env.VITE_API_BASE': JSON.stringify(process.env.VITE_API_BASE), + }, +}); diff --git a/labmap-chart/values.yaml b/labmap-chart/values.yaml index b333568..68307be 100644 --- a/labmap-chart/values.yaml +++ b/labmap-chart/values.yaml @@ -5,6 +5,8 @@ frontend: ingress: enabled: true host: labmap.dvirlabs.com + env: + API_BASE: "https://api-labmap.dvirlabs.com" backend: image: harbor.dvirlabs.com/my-apps/labmap-backend