Skip to content
Snippets Groups Projects
Verified Commit 7e9426ac authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

Add healthcheck to the image

This patch adds a healthcheck to the image in order to make sure that
things work properly during runtime and the image restarts when for
whatever reason the connection to the backend DNS container breaks.
parent a8c00af1
Branches
No related tags found
No related merge requests found
Pipeline #3547 passed
...@@ -17,6 +17,10 @@ USER doh ...@@ -17,6 +17,10 @@ USER doh
ENTRYPOINT ["entrypoint"] ENTRYPOINT ["entrypoint"]
ENV DOH_HEALTHCHECK_DOMAIN="ci-test.dns.shivering-isles.com"
HEALTHCHECK CMD curl "http://localhost:8053/dns-query?name=${DOH_HEALTHCHECK_DOMAIN}&type=A" | grep "127.0.0.123"
EXPOSE 8053 EXPOSE 8053
CMD ["./dns-over-https/doh-server/doh-server"] CMD ["./dns-over-https/doh-server/doh-server"]
...@@ -42,3 +42,10 @@ As alternative for enterprise setups, you can provide a [`policy.json`](https:// ...@@ -42,3 +42,10 @@ As alternative for enterprise setups, you can provide a [`policy.json`](https://
``` ```
*Don't forget to replace `<your dns host>` with an appropriated value. For example: dns.shivering-isles.com* *Don't forget to replace `<your dns host>` with an appropriated value. For example: dns.shivering-isles.com*
Healthcheck
---
The image contains a health check to make sure no defect container is running. This health check points by default to `ci-test.dns.shivering-isles.com` which is also used for CI in this repository. The domain returns the IP address `127.0.0.123` as A record.
You can configure an own domain using the `DOH_HEALTHCHECK_DOMAIN` environment variable. But make sure this domain returns the mentioned `127.0.0.123` as A record.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment