]> source.dussan.org Git - gitea.git/commit
Add health check endpoint (#18465)
authorttys3 <41882455+ttys3@users.noreply.github.com>
Wed, 4 May 2022 11:56:20 +0000 (19:56 +0800)
committerGitHub <noreply@github.com>
Wed, 4 May 2022 11:56:20 +0000 (14:56 +0300)
commite933f314268e41477c85e44a255667c02b19f231
tree23a610cffe6e2c5ef01ca677c391f1f8b86fe824
parent3114cd30b817692556306ce6261ace2b58c54b76
Add health check endpoint (#18465)

* chore: add health check endpoint

docs: update document about health check

fix: fix up Sqlite3 ping. current ping will success even if the db file is missing

fix: do not expose privacy information in output field

* refactor: remove HealthChecker struct

* Added `/api/healthz` to install routes.

This was needed for using /api/healthz endpoint in Docker healthchecks,
otherwise, Docker would never become healthy if using healthz endpoint
and users would not be able to complete the installation of Gitea.

* Update modules/cache/cache.go

* fine tune

* Remove unnecessary test code. Now there are 2 routes for installation (and maybe more in future)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Marcos de Oliveira <marcossantos@furb.br>
docs/content/doc/installation/on-kubernetes.en-us.md
docs/content/doc/installation/on-kubernetes.zh-tw.md
modules/cache/cache.go
routers/install/routes.go
routers/install/routes_test.go
routers/web/healthcheck/check.go [new file with mode: 0644]
routers/web/web.go