mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-29 19:10:51 -05:00
Add healthcheck command (#2856)
Currently vikunja has a `/health` endpoint that was added in https://kolaente.dev/vikunja/vikunja/pulls/998. Docker/compose cannot utilize this feature since vikunja's docker image doesn't have curl/wget as it is pruned which is great for the image size. This PR adds a `healthcheck` command that send an http request to `/health` and exits with 0 or non-zero depending on the result. It also adds a `HEALTHCHECK` to the docker image which calls this automatically. Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/2856 Reviewed-by: konrad <k@knt.li> Co-authored-by: ScribblerCoder <omar2001.oh@gmail.com> Co-committed-by: ScribblerCoder <omar2001.oh@gmail.com>
This commit is contained in:
@@ -53,3 +53,5 @@ ENV VIKUNJA_DATABASE_PATH=/db/vikunja.db
|
||||
|
||||
COPY --from=apibuilder /build/vikunja-* vikunja
|
||||
COPY --from=apibuilder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
HEALTHCHECK --interval=30s --timeout=30s --start-period=10s --retries=3 \
|
||||
CMD [ "/app/vikunja/vikunja", "healthcheck" ]
|
||||
Reference in New Issue
Block a user