mirror of https://github.com/docker/compose.git
Apply suggestions from code review
Co-authored-by: Chris Crone <christopher.crone@docker.com> Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
This commit is contained in:
parent
ef5e78dc14
commit
a0bd23ade9
|
@ -173,7 +173,7 @@ secrets:
|
|||
file: ./my_secret2.txt
|
||||
```
|
||||
|
||||
In this example the `nginx` service will have its secret mounted in `/run/secrets/renamedsecret1.txt` and `db` will have 2 files (`mysecretonmount1.txt` and `mysecretonmount2.txt`).
|
||||
In this example the `nginx` service will have its secret mounted to `/run/secrets/renamedsecret1.txt` and `db` will have 2 files (`mysecretonmount1.txt` and `mysecretonmount2.txt`).
|
||||
Both of them with be mounted in the same folder (`/mnt/dbmount/`).
|
||||
|
||||
|
||||
|
@ -212,8 +212,8 @@ The web container will have its limits set to the same values as reservations, b
|
|||
|
||||
## Healthchecks
|
||||
|
||||
Healthchecks can be described in the `healthcheck` section in the service. It translates to `LivenessProbe` in ACI. By that, the container is terminated if it becomes unhealthy.
|
||||
In order to restart automatically, the container also need to have a restart policy not set to "none"
|
||||
A health check can be described in the `healthcheck` section of each service. This is translated to a `LivenessProbe` in ACI. If the health check fails then the container is considered unhealthy and terminated.
|
||||
In order for the container to be restarted automatically, the service needs to have a restart policy other than `none` to be set. Note that the default restart policy if one isn't set is `any`.
|
||||
|
||||
```yaml
|
||||
services:
|
||||
|
@ -230,4 +230,4 @@ services:
|
|||
start_period: 40s
|
||||
```
|
||||
|
||||
**Note:** that the `test` command can be a `string` or an array starting or not by `NONE`, `CMD`, `CMD-SHELL`. In the ACI implementation, these prefixes are ignored.
|
||||
**Note:** that the `test` command can be a `string` or an array starting or not by `NONE`, `CMD`, `CMD-SHELL`. In the ACI implementation, these prefixes are ignored.
|
||||
|
|
|
@ -71,5 +71,7 @@ When running a container with `docker run`, by default the command line stays at
|
|||
|
||||
## Healthchecks
|
||||
|
||||
Healthchecks can be described with the `--healthcheck-xxx` flags. It translates to `LivenessProbe` in ACI. By that, the container is terminated if it becomes unhealthy.
|
||||
A health check can be described using the flags prefixed by `--healthcheck`. This is translated into `LivenessProbe` for ACI. If the health check fails then the container is considered unhealthy and terminated.
|
||||
In order for the container to be restarted automatically, the container needs to be run with a restart policy (set by the `--restart` flag) other than `no`. Note that the default restart policy if one isn't set is `no`.
|
||||
|
||||
In order to restart automatically, the container also need to have a restart policy set with `--restart` (`docker run` defaults to no restart policy)
|
||||
|
|
Loading…
Reference in New Issue