Debian Codegraph @

docs/reference/compose_restart.md

raw
1 # docker compose restart
2
3 <!---MARKER_GEN_START-->
4 Restarts all stopped and running services, or the specified services only.
5
6 If you make changes to your `compose.yml` configuration, these changes are not reflected
7 after running this command. For example, changes to environment variables (which are added
8 after a container is built, but before the container's command is executed) are not updated
9 after restarting.
10
11 If you are looking to configure a service's restart policy, refer to
12 [restart](https://github.com/compose-spec/compose-spec/blob/main/spec.md#restart)
13 or [restart_policy](https://github.com/compose-spec/compose-spec/blob/main/deploy.md#restart_policy).
14
15 ### Options
16
17 | Name | Type | Default | Description |
18 |:------------------|:-------|:--------|:--------------------------------------|
19 | `--dry-run` | `bool` | | Execute command in dry run mode |
20 | `--no-deps` | `bool` | | Don't restart dependent services |
21 | `-t`, `--timeout` | `int` | `0` | Specify a shutdown timeout in seconds |
22
23
24 <!---MARKER_GEN_END-->
25
26 ## Description
27
28 Restarts all stopped and running services, or the specified services only.
29
30 If you make changes to your `compose.yml` configuration, these changes are not reflected
31 after running this command. For example, changes to environment variables (which are added
32 after a container is built, but before the container's command is executed) are not updated
33 after restarting.
34
35 If you are looking to configure a service's restart policy, refer to
36 [restart](https://github.com/compose-spec/compose-spec/blob/main/spec.md#restart)
37 or [restart_policy](https://github.com/compose-spec/compose-spec/blob/main/deploy.md#restart_policy).