Create
This commit is contained in:
parent
b7781e2bab
commit
680ed81bd7
1 changed files with 18 additions and 0 deletions
18
docs/docker-swarm-usage.md
Normal file
18
docs/docker-swarm-usage.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Docker Swarm Usage
|
||||
|
||||
## Healthcheck
|
||||
|
||||
The Docker Image includes a Healthcheck with the following options (Look at Dockerfile):
|
||||
|
||||
--interval=30s: This option specifies the time interval at which the health check should be performed. In this case, the health check will be performed every 30 seconds.
|
||||
|
||||
--timeout=10s: This option specifies the amount of time to wait for a response from the health check command. If the response does not arrive within 10 seconds, the health check will be considered a failure.
|
||||
|
||||
--start-period=5s: This option specifies the amount of time to wait before starting the health check process. In this case, the health check process will begin 5 seconds after the container is started.
|
||||
|
||||
--retries=3: This option specifies the number of times Docker should retry the health check before considering the container to be unhealthy.
|
||||
|
||||
The CMD instruction is used to define the command that will be run as part of the health check. In this case, the command is "wget --quiet --tries=1 --spider http://localhost:3000/ || exit 1". This command will attempt to connect to http://localhost:3000/ and if it fails, it will exit with a status code of 1. If this command returns a status code other than 0, the health check will be considered a failure.
|
||||
|
||||
Overall, this HEALTHCHECK instruction is defining a health check process that will run every 30 seconds, wait up to 10 seconds for a response, begin 5 seconds after the container is started, and retry up to 3 times. The health check will consist of attempting to connect to http://localhost:3000/ and will consider the container to be unhealthy if it is unable to connect.
|
||||
|
Loading…
Reference in a new issue