From c36934e4f65ed72e9c488b975795281f76a1cd91 Mon Sep 17 00:00:00 2001 From: Dale Davies Date: Sat, 12 Feb 2022 00:07:49 +0000 Subject: [PATCH] Remove fpm-status page and add docker healthcheck --- Dockerfile | 2 ++ docker/fpm-pool.conf | 1 - docker/nginx.conf | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7e7fbe4..13e50c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,3 +62,5 @@ RUN mkdir -p /var/www/cache/application \ EXPOSE 8080 ENTRYPOINT ["entrypoint.sh"] + +HEALTHCHECK --interval=5m --timeout=10s CMD curl --silent --fail http://127.0.0.1:8080/fpm-ping || exit 1 \ No newline at end of file diff --git a/docker/fpm-pool.conf b/docker/fpm-pool.conf index 446d368..2f23c6b 100644 --- a/docker/fpm-pool.conf +++ b/docker/fpm-pool.conf @@ -6,7 +6,6 @@ user = jumpapp listen = /run/php-fpm.sock listen.owner = jumpapp -pm.status_path = /fpm-status pm = ondemand pm.max_children = 100 pm.process_idle_timeout = 10s diff --git a/docker/nginx.conf b/docker/nginx.conf index 617748c..d80ce86 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -74,7 +74,7 @@ http { } # Allow fpm ping and status from localhost - location ~ ^/(fpm-status|fpm-ping)$ { + location ~ ^/(fpm-ping)$ { access_log off; allow 127.0.0.1; deny all;