Skip to content

Commit fa4d57e

Browse files
committed
build(docker): stop containers with the default SIGTERM
The compose services overrode the stop signal with SIGINT, because the applications waited only on that one. They now handle SIGTERM as well, so the override is redundant: dropping it also means an image stopped outside this compose file, by plain `docker stop`, systemd or kubernetes, shuts down gracefully instead of being killed outright. The ENTRYPOINT comment no longer names a specific signal, since the point it makes about `exec` and PID 1 holds for either one.
1 parent 181f2e4 commit fa4d57e

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

‎docker/Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@ COPY --from=builder /app/release/${APP} /app/${APP}
7171
# the binary would otherwise read from its working directory is simply absent.
7272
#
7373
# `exec` replaces the shell so the app runs as PID 1 and receives the container's
74-
# stop signal (SIGINT) directly, allowing graceful shutdown.
74+
# stop signal directly, allowing graceful shutdown.
7575
ENTRYPOINT ["/bin/sh", "-c", "exec /app/${APP}"]

‎docker/docker-compose.yml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ services:
22
pool_sv2:
33
image: stratumv2/pool_sv2:main
44
container_name: pool_sv2
5-
stop_signal: SIGINT
65
# The pool is configured entirely from POOL__* variables in docker_env;
76
# there is no config file to mount.
87
env_file:
@@ -22,7 +21,6 @@ services:
2221
jd_client_sv2:
2322
image: stratumv2/jd_client_sv2:main
2423
container_name: jd_client_sv2
25-
stop_signal: SIGINT
2624
# Configured entirely from JDC__* variables in docker_env.
2725
env_file:
2826
- docker_env
@@ -39,7 +37,6 @@ services:
3937
tproxy_sv2:
4038
image: stratumv2/translator_sv2:main
4139
container_name: tproxy_sv2
42-
stop_signal: SIGINT
4340
# Configured entirely from TPROXY__* variables in docker_env.
4441
env_file:
4542
- docker_env

0 commit comments

Comments
 (0)