Open tsterker opened 1 month ago
you save me
Its happen to me in production, its possible to disable health checks without docker compose ?
If you're using the same base image of fpm-nginx
for your web and Laravel Queue (like we do), Laravel Queues do not have a health check to ensure the queue is running (unlike Horizon, which uses horizon:status
Unfortunately disabling the health check is required.
To disable a Docker healthcheck, you can use different approaches in Docker Compose and Dockerfile:
You can disable the healthcheck by setting it to null
:
services:
your_service:
image: your_image
healthcheck:
disable: true
If you've defined a healthcheck in your Dockerfile, you can disable it by using the HEALTHCHECK NONE
instruction:
# Disable healthcheck
HEALTHCHECK NONE
More detail here: https://docs.docker.com/compose/compose-file/05-services/#healthcheck
Steps To Reproduce
Outcome
What did you expect?
As per the docs it is mentioned that we are intentionally re-using the same app image:
So, I would expect that there is either
What happened instead?
If followed the docs and got an unhealthy container.
Affected Docker Images
Tested with
serversideup/php:8.3-unit-v3.2.0
Anything else?
Solution / Workaround
As a quick fix, we can simply disable the healthcheck:
I wonder if there are somewhat clean ways to introduce a dedicated healthcheck that could properly/cleanly determine if the queue worker is healthy.