friendica / docker

Docker image for Friendica
https://friendi.ca
GNU Affero General Public License v3.0
44 stars 18 forks source link

Healthcheck #231

Closed ne20002 closed 5 months ago

ne20002 commented 1 year ago

Seems as if Docker is supporting an extra entry point for health checks. It would be nice to have this implemented for fpm and for cron usage of image. For fpm: check for system answering a simple request For cron: check if cron is running

petersem commented 5 months ago

+1

nupplaphil commented 5 months ago

hm .. I found a similar approach here: https://www-apps.univ-lehavre.fr/forge/ba160129/fullstack-lab/-/commit/55fa7b41f613b7889cfd2b9a17d6433e540c9cfa

It uses the php-fpm ping-endpoint to check the healthiness.

But we will need to split the approach inside the images between php-fpm and cron, which adds additional complexity. I have to think about it :)

nupplaphil commented 5 months ago

Ok, I'm closing this issue because Friendica is an official image and thus healthchecks are not allowed:

https://github.com/docker-library/faq#healthcheck :

Explicit health checks are not added to official images for a number of reasons, some of which include:

  • many users will have their own idea of what "healthy" means and credentials change over time making generic health checks hard to define
  • after upgrading their images, current users will have extra unexpected load on their systems for healthchecks they don't necessarily need/want and may be unaware of
  • Kubernetes does not use Docker's heath checks (opting instead for separate liveness and readiness probes)
  • sometimes things like databases will take too long to initialize, and a defined health check will often cause the orchestration system to prematurely kill the container (https://github.com/docker-library/mysql/issues/439)

The docker-library/healthcheck repository is to serve as an example > for creating your own image derived from the prototypes present. They serve to showcase the best practices in creating your own healthcheck for your specific task and needs.