Wrapper around django-health-check to streamline health checks in directory apps.
pip install directory-healthcheck
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'
),
$ git clone https://github.com/uktrade/directory-healthcheck
$ cd directory-healthcheck
$ make
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