Skip to content

Commit 11e8cb3

Browse files
authored
Merge pull request #22408 from aevesdocker/ENGDOCS-2549
ENGDOCS-2549
1 parent 7e76be0 commit 11e8cb3

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

content/reference/compose-file/deploy.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,10 @@ deploy:
254254
- `on-failure`, the container is restarted if it exits due to an error, which manifests as a non-zero exit code.
255255
- `any` (default), containers are restarted regardless of the exit status.
256256
- `delay`: How long to wait between restart attempts, specified as a [duration](extension.md#specifying-durations). The default is 0, meaning restart attempts can occur immediately.
257-
- `max_attempts`: How many times to attempt to restart a container before giving up (default: never give up). If the restart does not
258-
succeed within the configured `window`, this attempt doesn't count toward the configured `max_attempts` value.
259-
For example, if `max_attempts` is set to '2', and the restart fails on the first attempt, more than two restarts must be attempted.
260-
- `window`: How long to wait before deciding if a restart has succeeded, specified as a [duration](extension.md#specifying-durations) (default:
261-
decide immediately).
257+
- `max_attempts`: The maximum number of failed restart attempts allowed before giving up. (Default: unlimited retries.)
258+
A failed attempt only counts toward `max_attempts` if the container does not successfully restart within the time defined by `window`.
259+
For example, if `max_attempts` is set to `2` and the container fails to restart within the window on the first try, Compose continues retrying until two such failed attempts occur, even if that means trying more than twice.
260+
- `window`: The amount of time to wait after a restart to determine whether it was successful, specified as a [duration](extension.md#specifying-durations) (default: the result is evaluated immediately after the restart).
262261

263262
```yml
264263
deploy:

0 commit comments

Comments
 (0)