From 2cd5d65197034ee943775d649c056b29cad698c7 Mon Sep 17 00:00:00 2001 From: Zoey Date: Sat, 16 Sep 2023 11:20:39 +0200 Subject: [PATCH 1/3] https://github.com/nextcloud/all-in-one/pull/3317#discussion_r1322718024 (1/3) Signed-off-by: Zoey --- Containers/mastercontainer/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index efef5a6f..3df0f3cb 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -56,8 +56,10 @@ RUN set -ex; \ sed -i 's/^pm = dynamic/pm = ondemand/' /usr/local/etc/php-fpm.d/www.conf; \ sed -i 's/^pm.max_children =.*/pm.max_children = 80/' /usr/local/etc/php-fpm.d/www.conf; \ sed -i 's|access.log = /proc/self/fd/2|access.log = /proc/self/fd/1|' /usr/local/etc/php-fpm.d/docker.conf; \ - grep -q ';listen.allowed_clients' /usr/local/etc/php-fpm.d/www.conf; \ - sed -i 's|;listen.allowed_clients.*|listen.allowed_clients = 127.0.0.1,::1|' /usr/local/etc/php-fpm.d/www.conf; \ + grep -q 'listen =' /usr/local/etc/php-fpm.d/www.conf; \ + sed -i 's|listen =.*|;listen = /var/run/php.sock # handled in zz-docker.conf|' /usr/local/etc/php-fpm.d/www.conf; \ + grep -q 'listen =' /usr/local/etc/php-fpm.d/zz-docker.conf; \ + sed -i 's|listen =.*|listen = /var/run/php.sock|' /usr/local/etc/php-fpm.d/zz-docker.conf; \ \ apk add --no-cache git; \ wget https://getcomposer.org/installer -O - | php -- --install-dir=/usr/local/bin --filename=composer; \ From 14acdbcb5aaf30203ce4ced275bbb0af35cfdd6a Mon Sep 17 00:00:00 2001 From: Zoey Date: Sat, 16 Sep 2023 11:21:28 +0200 Subject: [PATCH 2/3] use php unix socket (2/3) Signed-off-by: Zoey --- Containers/mastercontainer/mastercontainer.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/mastercontainer.conf b/Containers/mastercontainer/mastercontainer.conf index 701cb420..e3f6943b 100644 --- a/Containers/mastercontainer/mastercontainer.conf +++ b/Containers/mastercontainer/mastercontainer.conf @@ -19,7 +19,7 @@ Listen 8080 # PHP match - SetHandler "proxy:fcgi://localhost:9000" + SetHandler "proxy:unix:/var/run/php.sock" # Master dir DocumentRoot /var/www/docker-aio/php/public/ From b972c9961642220a271333e0ac8759a8ac25763a Mon Sep 17 00:00:00 2001 From: Zoey Date: Sat, 16 Sep 2023 11:22:41 +0200 Subject: [PATCH 3/3] use php unix socket (3/3) Signed-off-by: Zoey --- Containers/mastercontainer/healthcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/healthcheck.sh b/Containers/mastercontainer/healthcheck.sh index e5d27771..ef2931a8 100644 --- a/Containers/mastercontainer/healthcheck.sh +++ b/Containers/mastercontainer/healthcheck.sh @@ -5,6 +5,6 @@ if [ -f "/mnt/docker-aio-config/data/configuration.json" ]; then nc -z localhost 8000 || exit 1 nc -z localhost 8080 || exit 1 nc -z localhost 8443 || exit 1 - nc -z localhost 9000 || exit 1 nc -z localhost 9876 || exit 1 + [ -f /var/run/php.sock ] || exit 1 fi