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

Add HEALTHCHECK instruction to Dockerfile #407

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fumoboy007
Copy link

The Dockerfile currently does not have a HEALTHCHECK instruction. Users of the Docker image currently need to add it manually (e.g. via Docker Compose). Instead, the Dockerfile itself should include the instruction.

To determine whether the service is healthy, one can use the PING command via the Redis CLI, which is already part of the image. The command “is useful for […] verifying the server's ability to serve data”.

Most of the default HEALTHCHECK options seem reasonable:

--interval=30s
--timeout=30s
--start-interval=5s
--retries=3

I set --start-period=1s because the default of 0s is too quick for this program.

Users of the image can still override the HEALTHCHECK instruction if they want to customize the command or the options.

The `Dockerfile` currently does not have a `HEALTHCHECK` instruction. Users of the Docker image currently need to add it manually (e.g. via Docker Compose). Instead, the `Dockerfile` itself should include the instruction.

To determine whether the service is healthy, one can use the [`PING`](https://redis.io/docs/latest/commands/ping/) command via the [Redis CLI](https://redis.io/docs/latest/develop/connect/cli/), which is already part of the image. The command “is useful for […] verifying the server's ability to serve data”.

Most of the default `HEALTHCHECK` [options](https://docs.docker.com/reference/dockerfile/#healthcheck) seem reasonable:
```
--interval=30s
--timeout=30s
--start-interval=5s
--retries=3
```

I set `--start-period=1s` because the default of `0s` is too quick for this program.

Users of the image can still override the `HEALTHCHECK` instruction if they want to customize the command or the options.
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.

1 participant