fix: isolate profile frontend base paths
This commit is contained in:
@@ -411,7 +411,10 @@ export const buildProcessDefinitions = (
|
||||
script: frontendScript,
|
||||
cwd: frontendCwd,
|
||||
args: ['preview', '--host', '0.0.0.0', '--port', String(profile.apiPort - 1), '--outDir', frontendOutDir],
|
||||
env: baseEnv,
|
||||
env: {
|
||||
...baseEnv,
|
||||
VITE_APP_BASE_PATH: `/${profile.profile}`,
|
||||
},
|
||||
},
|
||||
api: {
|
||||
name: apiName,
|
||||
|
||||
@@ -177,6 +177,7 @@ describe('buildProcessDefinitions', () => {
|
||||
...processConfig,
|
||||
baseEnv: {
|
||||
DATABASE_URL: 'postgresql://integration.invalid/sammo',
|
||||
VITE_APP_BASE_PATH: '/gateway',
|
||||
GATEWAY_ROLE: 'orchestrator',
|
||||
NODE_APP_INSTANCE: '2',
|
||||
name: 'sammo:gateway-orchestrator',
|
||||
@@ -193,6 +194,7 @@ describe('buildProcessDefinitions', () => {
|
||||
expect(definition.env).not.toHaveProperty('NODE_APP_INSTANCE');
|
||||
expect(definition.env).not.toHaveProperty('GATEWAY_ROLE');
|
||||
}
|
||||
expect(definitions.frontend.env.VITE_APP_BASE_PATH).toBe('/che');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user