Skip to content

Commit dbaafe4

Browse files
committed
Add HEALTHCHECK instruction to Dockerfile.
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 [`pg_isready`](https://www.postgresql.org/docs/current/app-pg-isready.html) program, which is already part of the image. The program “checks the connection status of a PostgreSQL database server”. The default `HEALTHCHECK` [options](https://docs.docker.com/reference/dockerfile/#healthcheck) seem reasonable: ``` --interval=30s --timeout=30s --start-period=0s --start-interval=5s --retries=3 ``` Users of the image can still override the `HEALTHCHECK` instruction if they want to customize the command or the options.
1 parent 805329e commit dbaafe4

File tree

26 files changed

+52
-0
lines changed

26 files changed

+52
-0
lines changed

12/alpine3.19/Dockerfile

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

12/alpine3.20/Dockerfile

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

12/bookworm/Dockerfile

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

12/bullseye/Dockerfile

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

13/alpine3.19/Dockerfile

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

13/alpine3.20/Dockerfile

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

13/bookworm/Dockerfile

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

13/bullseye/Dockerfile

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

14/alpine3.19/Dockerfile

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

14/alpine3.20/Dockerfile

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)