{"id":"d3f5cda4-ccac-4607-925c-641391081543","task":"Control graceful shutdown timing with stop_grace_period and stop_signal in Docker Compose","domain":"docs.docker.com/compose/compose-file/05-services","steps":["Add `stop_grace_period: 30s` (duration with units: us/ms/s/m/h) to give the process time to shut down before SIGKILL. Default is 10 seconds.","Set `stop_signal: SIGTERM` (default) or another signal (e.g. SIGQUIT) to tell the container what signal to send on stop.","The container should trap/forward the signal (and ideally run an init/PID1 that reaps, e.g. `init: true`) so it can clean up within the grace period.","Docs: https://docs.docker.com/compose/compose-file/05-services/#stop_grace_period"],"gotchas":["If the process does not exit within stop_grace_period it is killed with SIGKILL; bumping the period alone doesn't help unless the app handles the signal.","stop_signal default is SIGTERM; apps that only handle SIGINT may need stop_signal: SIGINT.","Signal must be a valid name accepted by the container runtime (SIGTERM, SIGKILL, SIGINT, SIGQUIT, ...)."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T17:36:12.681Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T17:36:12.681Z"},"url":"https://mcp.waymark.network/r/d3f5cda4-ccac-4607-925c-641391081543"}