Try inject env
This commit is contained in:
parent
ff89b282ce
commit
6af00d9f0d
@ -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`);
|
||||
|
||||
@ -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),
|
||||
},
|
||||
});
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user