2022-03-09 12:57:07 +01:00
|
|
|
# docker compose restart
|
|
|
|
|
|
|
|
<!---MARKER_GEN_START-->
|
2022-07-29 15:30:11 +02:00
|
|
|
Restart service containers
|
2022-03-09 12:57:07 +01:00
|
|
|
|
|
|
|
### Options
|
|
|
|
|
2022-12-29 14:32:16 +01:00
|
|
|
| Name | Type | Default | Description |
|
|
|
|
|:------------------|:------|:--------|:--------------------------------------|
|
2023-05-05 12:43:27 +02:00
|
|
|
| `--dry-run` | | | Execute command in dry run mode |
|
2023-02-14 11:03:29 +01:00
|
|
|
| `--no-deps` | | | Don't restart dependent services. |
|
2023-06-12 15:18:25 +02:00
|
|
|
| `-t`, `--timeout` | `int` | `0` | Specify a shutdown timeout in seconds |
|
2022-03-09 12:57:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
<!---MARKER_GEN_END-->
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
2022-07-29 15:30:11 +02:00
|
|
|
Restarts all stopped and running services, or the specified services only.
|
2021-06-08 09:39:49 +02:00
|
|
|
|
2022-03-09 13:24:09 +01:00
|
|
|
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
|
2021-06-08 09:39:49 +02:00
|
|
|
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)
|
2021-09-13 17:14:32 +02:00
|
|
|
or [restart_policy](https://github.com/compose-spec/compose-spec/blob/master/deploy.md#restart_policy).
|