Try inject env

This commit is contained in:
dvirlabs 2025-07-01 05:56:13 +03:00
parent ff89b282ce
commit 6af00d9f0d
3 changed files with 7 additions and 6 deletions

View File

@ -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`);

View File

@ -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),
},
});

View File

@ -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