From 74e69c01932842d9efc24585008e56ee82473899 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 30 Apr 2021 12:33:42 +0100 Subject: [PATCH 1/7] Add healthcheck startup delay by 5secs and reduced interval check to 15s to reduce waiting time for docker aware edge routers bringing an instance online --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 4f5cd06d7294..2bdc607e66e6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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 From 3a11729a97c9ff6f50a11c344b719e84b3ce336e Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 30 Apr 2021 12:36:31 +0100 Subject: [PATCH 2/7] Updated healthcheck section in readme to include startup_period and tweaked values to match whats in the dockerfile --- docker/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/README.md b/docker/README.md index a7d1e670fe91..f8ef19d99e13 100644 --- a/docker/README.md +++ b/docker/README.md @@ -207,9 +207,10 @@ You will need 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 From 207d6635cfab9e130febe25869461fff4354e7ac Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 30 Apr 2021 12:42:06 +0100 Subject: [PATCH 3/7] Added changelog entry --- changelog.d/9913.docker | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/9913.docker diff --git a/changelog.d/9913.docker b/changelog.d/9913.docker new file mode 100644 index 000000000000..feebc78abb65 --- /dev/null +++ b/changelog.d/9913.docker @@ -0,0 +1 @@ +Added startup_delay to docker healthcheck to reduce waiting time for coming online, contributed by @Maquis196 From b94d76ee1a15b0f0efa3711e1c48a669ebcb5091 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 30 Apr 2021 12:44:15 +0100 Subject: [PATCH 4/7] missing period at end --- changelog.d/9913.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/9913.docker b/changelog.d/9913.docker index feebc78abb65..99b707b0ae9a 100644 --- a/changelog.d/9913.docker +++ b/changelog.d/9913.docker @@ -1 +1 @@ -Added startup_delay to docker healthcheck to reduce waiting time for coming online, contributed by @Maquis196 +Added startup_delay to docker healthcheck to reduce waiting time for coming online, contributed by @Maquis196. From 2c8850ffb3c0c08286504ec73134b1ade5b713df Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 30 Apr 2021 12:49:28 +0100 Subject: [PATCH 5/7] Updated readme to include instructions for disabling healthcheck in docker-compose and updated changelog to reflect that --- changelog.d/9913.docker | 2 +- docker/README.md | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/changelog.d/9913.docker b/changelog.d/9913.docker index 99b707b0ae9a..93835e14cba0 100644 --- a/changelog.d/9913.docker +++ b/changelog.d/9913.docker @@ -1 +1 @@ -Added startup_delay to docker healthcheck to reduce waiting time for coming online, contributed by @Maquis196. +Added startup_delay to docker healthcheck to reduce waiting time for coming online, updated readme for extra options, contributed by @Maquis196. diff --git a/docker/README.md b/docker/README.md index f8ef19d99e13..747e66b0577a 100644 --- a/docker/README.md +++ b/docker/README.md @@ -191,6 +191,16 @@ whilst running the above `docker run` commands. ``` --no-healthcheck ``` + +## Disabling the healthcheck in docker-compose + +If you wish to disable the healthcheck via docker-compose append your stanza with the follow. + +``` + 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 @@ -213,6 +223,7 @@ healthcheck: start_period: 5s ``` + ## Using jemalloc Jemalloc is embedded in the image and will be used instead of the default allocator. From a3c92c8b064e1e60092ca9fb1724f91841b6cdd1 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 30 Apr 2021 20:36:14 +0100 Subject: [PATCH 6/7] Cleanup of readme, fixed spelling, cleared whitespace and made clearer version of what for healtcheck to work --- docker/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docker/README.md b/docker/README.md index 747e66b0577a..33c5e3361261 100644 --- a/docker/README.md +++ b/docker/README.md @@ -192,9 +192,9 @@ whilst running the above `docker run` commands. --no-healthcheck ``` -## Disabling the healthcheck in docker-compose +## Disabling the healthcheck in docker-compose file -If you wish to disable the healthcheck via docker-compose append your stanza with the follow. +If you wish to disable the healthcheck via docker-compose append your stanza with the following. ``` healthcheck: @@ -212,7 +212,7 @@ 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: @@ -223,7 +223,6 @@ healthcheck: start_period: 5s ``` - ## Using jemalloc Jemalloc is embedded in the image and will be used instead of the default allocator. From 545ea1a80114f73699320ab096fdfa740e83487d Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 4 May 2021 14:17:41 +0100 Subject: [PATCH 7/7] replaced stanza with service configuration in the readme --- docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/README.md b/docker/README.md index 33c5e3361261..c8d3c4b3daf3 100644 --- a/docker/README.md +++ b/docker/README.md @@ -194,7 +194,7 @@ whilst running the above `docker run` commands. ## Disabling the healthcheck in docker-compose file -If you wish to disable the healthcheck via docker-compose append your stanza with the following. +If you wish to disable the healthcheck via docker-compose, append the following to your service configuration. ``` healthcheck: