Commit a45f2aa
committed
Add
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”.
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.HEALTHCHECK instruction to Dockerfile.1 parent 805329e commit a45f2aa
File tree
26 files changed
+52
-0
lines changed- 12
- alpine3.19
- alpine3.20
- bookworm
- bullseye
- 13
- alpine3.19
- alpine3.20
- bookworm
- bullseye
- 14
- alpine3.19
- alpine3.20
- bookworm
- bullseye
- 15
- alpine3.19
- alpine3.20
- bookworm
- bullseye
- 16
- alpine3.19
- alpine3.20
- bookworm
- bullseye
- 17
- alpine3.19
- alpine3.20
- bookworm
- bullseye
26 files changed
+52
-0
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments