compose_restart
Restart Docker Compose services without recreating containers or applying config changes. Use to pick up runtime file changes or clear in-memory state.
Instructions
Stop then start services without recreating containers or applying config changes.
Use this to bounce a service (e.g. to pick up a runtime file change or clear an
in-memory state). If the compose file has changed (new image, environment, volumes,
ports) use compose_up instead — it recreates affected containers to apply the diff.
stop_timeout_seconds controls the SIGTERM grace period before Docker sends SIGKILL.
args:
project_dir - Dir containing the compose file (default: server cwd)
files - Explicit compose file paths, passed as -f
project_name - Override the compose project name
services - Restart only these services; omit to restart all
stop_timeout_seconds - Seconds to wait for graceful stop before SIGKILL
timeout_seconds - Subprocess timeout (default 300s)
returns: dict - {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | ||
| services | No | ||
| project_dir | No | ||
| project_name | No | ||
| timeout_seconds | No | ||
| stop_timeout_seconds | No |