compose/docs/reference/compose_restart.md
robbert-ef 68bd0eb523
cli: fix timeout behavior on up / restart / stop (#10672)
Do not set a hardcoded default timeout of 10 seconds when restarting / stopping but use the container `StopTimeout` (defaults to 10 seconds).

Also fixed custom timeout not used when invoking `up`.

Signed-off-by: Robbert Segeren <robbert.segeren@easyflex.nl>
2023-06-12 09:18:25 -04:00

29 lines
1.1 KiB
Markdown

# docker compose restart
<!---MARKER_GEN_START-->
Restart service containers
### Options
| Name | Type | Default | Description |
|:------------------|:------|:--------|:--------------------------------------|
| `--dry-run` | | | Execute command in dry run mode |
| `--no-deps` | | | Don't restart dependent services. |
| `-t`, `--timeout` | `int` | `0` | Specify a shutdown timeout in seconds |
<!---MARKER_GEN_END-->
## Description
Restarts all stopped and running services, or the specified services only.
If you make changes to your `compose.yml` configuration, these changes are not reflected
after running this command. For example, changes to environment variables (which are added
after a container is built, but before the container's command is executed) are not updated
after restarting.
If you are looking to configure a service's restart policy, please refer to
[restart](https://github.com/compose-spec/compose-spec/blob/master/spec.md#restart)
or [restart_policy](https://github.com/compose-spec/compose-spec/blob/master/deploy.md#restart_policy).