compose: Change default grace period to 10s

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2018-11-22 12:18:18 +00:00
parent 20d0af1d70
commit fe44d496fb
No known key found for this signature in database
GPG Key ID: 69264F9C923F55C1

View File

@ -151,7 +151,7 @@ export class Service {
delete config.shmSize;
// time strings
let stopGracePeriod = 0;
let stopGracePeriod = 10;
if (config.stopGracePeriod != null) {
stopGracePeriod = new Duration(config.stopGracePeriod).seconds();
}
@ -493,7 +493,7 @@ export class Service {
extraHosts: container.HostConfig.ExtraHosts || [],
ulimits,
stopSignal: (container.Config as any).StopSignal || '',
stopGracePeriod: (container.Config as any).StopTimeout || 0,
stopGracePeriod: (container.Config as any).StopTimeout || 10,
healthcheck: ComposeUtils.dockerHealthcheckToServiceHealthcheck(
(container.Config as any).Healthcheck || {},
),