Skip to content

Commit

Permalink
ci: add healthcheck endpoint (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
olemathias authored Oct 9, 2024
1 parent 1f2ba79 commit 673f21e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Django>=4.2,<4.3
wagtail>=6.2
psycopg>=3.1.8,<4.0
social-auth-app-django==5.4.2
social-auth-app-django==5.4.2
django-health-check==3.18.3
7 changes: 7 additions & 0 deletions tgno/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
"wagtail",
"modelcluster",
"taggit",
"health_check",
"health_check.db",
"health_check.cache",
"health_check.storage",
"health_check.contrib.migrations",
"social_django",
"django.contrib.admin",
"django.contrib.auth",
Expand Down Expand Up @@ -207,3 +212,5 @@

if DISABLE_LOCAL_AUTH is False:
AUTHENTICATION_BACKENDS.append("django.contrib.auth.backends.ModelBackend")

HEALTH_CHECK = {"SUBSETS": {"liveness": ["DatabaseBackend"]}}
1 change: 1 addition & 0 deletions tgno/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from .api import api_router as base_api_router

urlpatterns = [
path(r"backend-health/", include("health_check.urls")),
path("django-admin/", admin.site.urls),
path("admin/", include(wagtailadmin_urls)),
path("", include("social_django.urls")),
Expand Down

0 comments on commit 673f21e

Please sign in to comment.