rharter / docker-goaccess-cloudfront

A Docker container to process and serve website analytics using CloudFront and GoAccess. https://hub.docker.com/r/rharter/goaccess-cloudfront
MIT License
18 stars 5 forks source link

Docker health check integration #4

Open JakeWharton opened 4 years ago

JakeWharton commented 4 years ago

I think this requires a /_status endpoint or something to be served by nginx to indicate that it's up. Ideally this would be backed by something like a HEAD request to GoAccess to ensure it's up and working. We don't really care about just nginx.

rharter commented 4 years ago

I like this. The goaccess redirect won't work since goaccess isn't a process in this case, it's run as a from job that processes and outputs a static HTML file. Since CloudFront logs aren't written in real-time there isn't much need in having goaccess continually running.

JakeWharton commented 4 years ago

I've never used this before. I just see it being used in other containers.

The full docs are here: https://docs.docker.com/engine/reference/builder/#healthcheck. I was very wrong about the mechanism by which it works.