fix: controller 자체 갱신의 PM2 인자 복구
daemon 기본 명령을 사용해 PM2가 단일 인자 배열을 JSON 문자열로 전달하는 운영 오류를 피한다.
This commit is contained in:
@@ -36,7 +36,8 @@ export const buildReleaseControllerDefinition = (
|
||||
name: CONTROLLER_PROCESS_NAME,
|
||||
script: path.join(workspaceRoot, 'app', 'release-controller', 'dist', 'index.js'),
|
||||
cwd: path.join(workspaceRoot, 'app', 'release-controller'),
|
||||
args: ['daemon'],
|
||||
// The CLI defaults to daemon. Omitting a one-element args array avoids PM2
|
||||
// serializing it as the literal `["daemon"]` during an in-process self-upgrade.
|
||||
env: {
|
||||
...sanitizeManagedProcessEnv(config.baseEnv),
|
||||
GATEWAY_DATABASE_URL: config.gatewayDatabaseUrl,
|
||||
|
||||
@@ -445,8 +445,8 @@ describe('upgradeReleaseController', () => {
|
||||
expect(starts.at(-1)).toMatchObject({
|
||||
name: 'sammo:release-controller',
|
||||
cwd: path.join(workspace, 'app', 'release-controller'),
|
||||
args: ['daemon'],
|
||||
});
|
||||
expect(starts.at(-1)?.args).toBeUndefined();
|
||||
});
|
||||
|
||||
it('restores the old controller definition when the new daemon cannot start', async () => {
|
||||
|
||||
Reference in New Issue
Block a user