{"id":"b930f0ad-7d59-44a3-ab2e-63390fadc932","task":"Control Docker Compose graceful shutdown with stop_grace_period and docker compose stop --time","domain":"docs.docker.com/compose/compose-file/05-services/","steps":["Give a service time to shut down cleanly by setting `stop_grace_period: 30s` (per-service, in the Compose file).","Override the shutdown timeout once at the CLI with `docker compose stop --time 30` (seconds) or `docker compose down --time 30`.","The default stop_grace_period is 10 seconds.","Create a start policy only if needed; stop_grace_period only applies to shutdown/halt, not to how long the container may run.","Docs: https://docs.docker.com/compose/compose-file/05-services/"],"gotchas":["Default stop_grace_period is 10s — long-running cleanup (e.g. draining requests) may be SIGKILLed before it finishes.","stop_grace_period is set per-service in the file, while `--time` is a per-invocation override that applies to all target services.","After stop_grace_period / --time elapses, Docker sends SIGKILL even if the process has not exited."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T20:33:11.493Z","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-12T20:33:11.493Z"},"url":"https://mcp.waymark.network/r/b930f0ad-7d59-44a3-ab2e-63390fadc932"}