Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do healthcheck more frequently at startup #4292

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

davidyuk
Copy link
Member

@davidyuk davidyuk commented Mar 9, 2024

This PR is supported by the Æternity Foundation

Before this PR:

$ docker compose up node -d --wait
[+] Running 1/1
 ✔️ Container aepp-sdk-js-node-1  Healthy 30.9s

With --start-period=10s --start-interval=2s:

$ docker compose up node -d --wait
[+] Running 1/1
 ✔️ Container aepp-sdk-js-node-1  Healthy 3.4s

With --start-period=5s --start-interval=1s:

$ docker compose up node -d --wait
[+] Running 1/1
 ✔️ Container aepp-sdk-js-node-1  Healthy 3.2s

https://docs.docker.com/reference/dockerfile/#healthcheck
related aeternity/aesophia_http#133

To don't be confusing because docker does 3 healthcheck retries by default.
@dincho
Copy link
Member

dincho commented Mar 11, 2024

Please note:

start interval is the time between health checks during the start period. This option requires Docker Engine version 25.0 or later.

That's a bit on the edge :)

@davidyuk
Copy link
Member Author

Ok, let's wait a bit then. I found a workaround:

    healthcheck:
      interval: 2s

in docker-compose.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants