directory-healthcheck

Wrapper around django-health-check to streamline health checks in directory apps.
Installation
pip install directory-healthcheck
Usage
Update your settings.py
:
import directory_healthcheck.backends
INSTALLED_APPS = [
...
'directory_healthcheck',
...
]
DIRECTORY_HEALTHCHECK_TOKEN = 'some-secret-token'
DIRECTORY_HEALTHCHECK_BACKENDS [
directory_healthcheck.backends.APIBackend,
directory_healthcheck.backends.SingleSignOnBackend,
directory_healthcheck.backends.FormsAPIBackend,
]
Update your urls.py
:
url(
r'^healthcheck/$',
directory_healthcheck.views.HealthcheckView.as_view(),
name='healthcheck'
),
Development
$ git clone https://github.com/uktrade/directory-healthcheck
$ cd directory-healthcheck
$ make
Publish to PyPI
The package should be published to PyPI on merge to master. If you need to do it locally then get the credentials from rattic and add the environment variables to your host machine:
Setting |
---|
DIRECTORY_PYPI_USERNAME |
DIRECTORY_PYPI_PASSWORD |
Then run the following command:
make publish