Correct Docker build CI/CD

This commit is contained in:
2025-07-15 14:11:45 +02:00
parent d9acd72d7b
commit 00759473f2
2 changed files with 1 additions and 5 deletions

View File

@@ -1,16 +1,13 @@
// Define your config interface
export interface AppConfig {
API_BASE_URL: string;
OTHER_VAR: string;
}
// Global variable that will be set at runtime
let runtimeConfig: AppConfig = {
API_BASE_URL: import.meta.env.VITE_API_BASE_URL || '',
OTHER_VAR: import.meta.env.VITE_OTHER_VAR || ''
};
// Function to initialize config at runtime
export function initConfig(config: Partial<AppConfig>) {
runtimeConfig = {
...runtimeConfig,
@@ -18,7 +15,6 @@ export function initConfig(config: Partial<AppConfig>) {
};
}
// Accessor function
export function getConfig(): AppConfig {
return runtimeConfig;
}