diff options
| author | Marc <github@wuast24.de> | 2024-10-08 00:05:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-07 23:05:46 +0100 |
| commit | e2644ebc11e9521ece054a846f8c993c322a8332 (patch) | |
| tree | 4d820ebf47451aa2af77feef591f840695af4266 /docker | |
| parent | 904eb5a552a48b5e03750eda0f11a57a17497ea1 (diff) | |
| download | karakeep-e2644ebc11e9521ece054a846f8c993c322a8332.tar.zst | |
docker: Add HEALTHCHECK to Dockerfile (#508)
i added the healthcheck to the AIO and legacy web container.
checked on my AIO instance:
```
{
"Status":"healthy",
"FailingStreak":0,
"Log":[
{
"Start":"2024-10-07T21:23:19.83382568+02:00",
"End":"2024-10-07T21:23:20.003640388+02:00",
"ExitCode":0,
"Output":"Connecting to 127.0.0.1:3000 (127.0.0.1:3000)\nremote file exists\n"
}
]
}
```
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/Dockerfile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 4a687718..5a2ebbaa 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -103,6 +103,8 @@ RUN touch /etc/s6-overlay/s6-rc.d/user/contents.d/init-db-migration \ /etc/s6-overlay/s6-rc.d/user/contents.d/svc-web \ /etc/s6-overlay/s6-rc.d/user/contents.d/svc-workers +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:3000/api/health || exit 1 + ################# The web container ############## FROM aio_builder AS web @@ -110,6 +112,8 @@ FROM aio_builder AS web RUN touch /etc/s6-overlay/s6-rc.d/user/contents.d/init-db-migration \ /etc/s6-overlay/s6-rc.d/user/contents.d/svc-web +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:3000/api/health || exit 1 + ################# The workers container ############## FROM aio_builder AS workers |
