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