I added health check to my Dockerfile:
HEALTHCHECK --interval=1m --timeout=5s --retries=2 --start-period=10s \
CMD wget -qO- http://localhost:8070/healthcheck || exit 1
In my project main urls.py file I added entry:
url(r'^healthcheck/', lambda r: HttpResponse())
The project is activated and deployed, so I can understand the healthcheck is valid, however - I keep getting:
2017-12-17 13:25:27,891 WARNING base 51 140551932685128 Not Found: /healthcheck
written to the logs (once a minute). The log entry is added also when I run the wget from inside the server.
Is it an issue with the healthcheck syntax, the django entry set up or the wget in docker?
Please assist. Thanks.
docker inspect <id> --format "{{.Config.Healthcheck}}"
I tried theHEALTCHECK
line and got after building:Unknown type "\\" in HEALTHCHECK (try CMD)
After removing the backslash betweenstart-period
andCMD
it worked