Merge pull request #822 from balena-io/issue-821

compose: Change default stop signal from '' to SIGTERM
This commit is contained in:
Shaun Mulligan
2018-11-27 12:38:50 -08:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@ -349,7 +349,7 @@ export class Service {
pidsLimit: 0, pidsLimit: 0,
securityOpt: [], securityOpt: [],
stopGracePeriod, stopGracePeriod,
stopSignal: '', stopSignal: 'SIGTERM',
sysctls: {}, sysctls: {},
tmpfs, tmpfs,
usernsMode: '', usernsMode: '',
@ -492,7 +492,7 @@ export class Service {
tmpfs, tmpfs,
extraHosts: container.HostConfig.ExtraHosts || [], extraHosts: container.HostConfig.ExtraHosts || [],
ulimits, ulimits,
stopSignal: (container.Config as any).StopSignal || '', stopSignal: (container.Config as any).StopSignal || 'SIGTERM',
stopGracePeriod: (container.Config as any).StopTimeout || 10, stopGracePeriod: (container.Config as any).StopTimeout || 10,
healthcheck: ComposeUtils.dockerHealthcheckToServiceHealthcheck( healthcheck: ComposeUtils.dockerHealthcheckToServiceHealthcheck(
(container.Config as any).Healthcheck || {}, (container.Config as any).Healthcheck || {},

View File

@ -159,7 +159,7 @@ export function getStopSignal(
} }
return composeStop; return composeStop;
} }
return _.get(imageInfo, 'Config.StopSignal', ''); return _.get(imageInfo, 'Config.StopSignal', 'SIGTERM');
} }
// TODO: Move healthcheck stuff into seperate module // TODO: Move healthcheck stuff into seperate module