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

Feature request: Define a start interval for the healthcheck #709

Open
ncovercash opened this issue May 3, 2024 · 1 comment
Open

Feature request: Define a start interval for the healthcheck #709

ncovercash opened this issue May 3, 2024 · 1 comment

Comments

@ncovercash
Copy link

  1. What's the feature?

Docker, in API 1.44+ (and engine/compose 24+?) introduced a new feature that defines an interval to conduct healthchecks during the startup period: docker create doc with --health-start-interval, release of compose. This allows rapid checks of health while a container starts up, then falls back to the regular interval once the container has started.

This is ideal for applications such as this image, where it may take a few seconds to start up, and then does not need to be poked often (hence the current interval of 1m). It would be nice if this image would define a start interval, ideally with a small (5s?) value, as the container would be able to become healthy much quicker and speed up deployments!

  1. Extra information?

The version of docker provided in GitHub Actions may be a bit too old to build with this newer flag. You can add the following to your workflow to workaround this:

      - name: Print Docker version
        run: docker version

      - name: Install Latest Docker
        run: |
          curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
          sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu  $(lsb_release -cs)  stable"
          sudo apt-get update
          sudo apt-get install docker-ce
@qdm12
Copy link
Owner

qdm12 commented Aug 17, 2024

Hi there! Thanks for the suggestion and the learning moment! On the other hand, ddns-updater checks the health comparing the resolved domain names IPs with the last stored IP address

func isHealthy(ctx context.Context, db AllSelecter, resolver LookupIPer) (err error) {

This works well, especially after the program has started and sent an initial update (usually takes below 1 second);

Now how could we use this new start healthcheck, any suggestions? We can't use the same mechanism since the dns records could be outdated at program start before an update.

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

No branches or pull requests

2 participants