Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Docker healthcheck timings - add startup delay and changed interval #9913

Merged
merged 7 commits into from
May 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/9913.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added startup_delay to docker healthcheck to reduce waiting time for coming online, updated readme for extra options, contributed by @Maquis196.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ EXPOSE 8008/tcp 8009/tcp 8448/tcp

ENTRYPOINT ["/start.py"]

HEALTHCHECK --interval=1m --timeout=5s \
HEALTHCHECK --start-period=5s --interval=15s --timeout=5s \
CMD curl -fSs http://localhost:8008/health || exit 1
17 changes: 14 additions & 3 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,16 @@ whilst running the above `docker run` commands.
```
--no-healthcheck
```

## Disabling the healthcheck in docker-compose file

If you wish to disable the healthcheck via docker-compose, append the following to your service configuration.

```
healthcheck:
disable: true
```

## Setting custom healthcheck on docker run

If you wish to point the healthcheck at a different port with docker command, add the following
Expand All @@ -202,14 +212,15 @@ If you wish to point the healthcheck at a different port with docker command, ad
## Setting the healthcheck in docker-compose file

You can add the following to set a custom healthcheck in a docker compose file.
You will need version >2.1 for this to work.
You will need docker-compose version >2.1 for this to work.

```
healthcheck:
test: ["CMD", "curl", "-fSs", "http://localhost:8008/health"]
interval: 1m
timeout: 10s
interval: 15s
timeout: 5s
retries: 3
start_period: 5s
```

## Using jemalloc
Expand Down