Skip to content

Commit

Permalink
Add health check endpoint (fixes #31)
Browse files Browse the repository at this point in the history
  • Loading branch information
milesmcc committed May 28, 2020
1 parent fcfbbe8 commit c61d23c
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 47 deletions.
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ django-redis-cache = "*"
pycountry = "*"
ipaddress = "*"
html2text = "*"
django-health-check = "*"

[pipenv]
allow_prereleases = true
96 changes: 52 additions & 44 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions shynet/shynet/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
"django.contrib.staticfiles",
"django.contrib.sites",
"django.contrib.humanize",
"health_check",
"health_check.db",
"health_check.cache",
"rules.apps.AutodiscoverRulesConfig",
"a17t",
"core",
Expand Down Expand Up @@ -105,9 +108,7 @@
"PASSWORD": os.environ.get("DB_PASSWORD"),
"HOST": os.environ.get("DB_HOST"),
"PORT": os.environ.get("DB_PORT"),
"OPTIONS": {
"connect_timeout": 5
}
"OPTIONS": {"connect_timeout": 5},
}
}

Expand Down Expand Up @@ -210,6 +211,7 @@
ACCOUNT_EMAIL_SUBJECT_PREFIX = ""
ACCOUNT_USER_DISPLAY = lambda k: k.email
ACCOUNT_SIGNUPS_ENABLED = os.getenv("ACCOUNT_SIGNUPS_ENABLED", "False") == "True"
ACCOUNT_EMAIL_VERIFICATION = os.getenv("ACCOUNT_EMAIL_VERIFICATION", "none")

LOGIN_REDIRECT_URL = "/"

Expand Down
1 change: 1 addition & 0 deletions shynet/shynet/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
path("accounts/", include("allauth.urls")),
path("ingress/", include(("analytics.ingress_urls", "ingress")), name="ingress"),
path("dashboard/", include(("dashboard.urls", "dashboard"), namespace="dashboard")),
path("healthz/", include('health_check.urls')),
path("", include(("core.urls", "core"), namespace="core")),
]

0 comments on commit c61d23c

Please sign in to comment.