Merge pull request #3073 from perinm/fix/stop-grace-period-swarm

fix: apply stop grace period within container spec
This commit is contained in:
Mauricio Siu
2025-11-28 10:42:26 -06:00
committed by GitHub
7 changed files with 18 additions and 16 deletions
+1 -2
View File
@@ -125,6 +125,7 @@ export const mechanizeDockerContainer = async (
Image: image,
Env: envVariables,
Mounts: [...volumesMount, ...bindsMount, ...filesMount],
...(StopGracePeriod && { StopGracePeriod }),
...(command
? {
Command: ["/bin/sh"],
@@ -153,8 +154,6 @@ export const mechanizeDockerContainer = async (
})),
},
UpdateConfig,
...(StopGracePeriod !== undefined &&
StopGracePeriod !== null && { StopGracePeriod }),
};
try {
@@ -73,6 +73,7 @@ export const buildMariadb = async (mariadb: MariadbNested) => {
Image: dockerImage,
Env: envVariables,
Mounts: [...volumesMount, ...bindsMount, ...filesMount],
...(StopGracePeriod && { StopGracePeriod }),
...(command
? {
Command: ["/bin/sh"],
@@ -106,8 +107,6 @@ export const buildMariadb = async (mariadb: MariadbNested) => {
: [],
},
UpdateConfig,
...(StopGracePeriod !== undefined &&
StopGracePeriod !== null && { StopGracePeriod }),
};
try {
const service = docker.getService(appName);
+1 -2
View File
@@ -121,6 +121,7 @@ ${command ?? "wait $MONGOD_PID"}`;
Image: dockerImage,
Env: envVariables,
Mounts: [...volumesMount, ...bindsMount, ...filesMount],
...(StopGracePeriod && { StopGracePeriod }),
...(replicaSets
? {
Command: ["/bin/bash"],
@@ -159,8 +160,6 @@ ${command ?? "wait $MONGOD_PID"}`;
: [],
},
UpdateConfig,
...(StopGracePeriod !== undefined &&
StopGracePeriod !== null && { StopGracePeriod }),
};
try {
+1 -2
View File
@@ -79,6 +79,7 @@ export const buildMysql = async (mysql: MysqlNested) => {
Image: dockerImage,
Env: envVariables,
Mounts: [...volumesMount, ...bindsMount, ...filesMount],
...(StopGracePeriod && { StopGracePeriod }),
...(command
? {
Command: ["/bin/sh"],
@@ -112,8 +113,6 @@ export const buildMysql = async (mysql: MysqlNested) => {
: [],
},
UpdateConfig,
...(StopGracePeriod !== undefined &&
StopGracePeriod !== null && { StopGracePeriod }),
};
try {
const service = docker.getService(appName);
@@ -72,6 +72,7 @@ export const buildPostgres = async (postgres: PostgresNested) => {
Image: dockerImage,
Env: envVariables,
Mounts: [...volumesMount, ...bindsMount, ...filesMount],
...(StopGracePeriod && { StopGracePeriod }),
...(command
? {
Command: ["/bin/sh"],
@@ -105,8 +106,6 @@ export const buildPostgres = async (postgres: PostgresNested) => {
: [],
},
UpdateConfig,
...(StopGracePeriod !== undefined &&
StopGracePeriod !== null && { StopGracePeriod }),
};
try {
const service = docker.getService(appName);
+1 -2
View File
@@ -70,6 +70,7 @@ export const buildRedis = async (redis: RedisNested) => {
Image: dockerImage,
Env: envVariables,
Mounts: [...volumesMount, ...bindsMount, ...filesMount],
...(StopGracePeriod && { StopGracePeriod }),
Command: ["/bin/sh"],
Args: [
"-c",
@@ -102,8 +103,6 @@ export const buildRedis = async (redis: RedisNested) => {
: [],
},
UpdateConfig,
...(StopGracePeriod !== undefined &&
StopGracePeriod !== null && { StopGracePeriod }),
};
try {