Skip to content

Commit

Permalink
Merge pull request #3353 from nextcloud/linux-php-socket
Browse files Browse the repository at this point in the history
  • Loading branch information
szaimen authored Sep 19, 2023
2 parents 18b281e + b972c99 commit 5cc0153
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Containers/mastercontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
2 changes: 1 addition & 1 deletion Containers/mastercontainer/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Containers/mastercontainer/mastercontainer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Listen 8080

# PHP match
<FilesMatch "\.php$">
SetHandler "proxy:fcgi://localhost:9000"
SetHandler "proxy:unix:/var/run/php.sock"
</FilesMatch>
# Master dir
DocumentRoot /var/www/docker-aio/php/public/
Expand Down

0 comments on commit 5cc0153

Please sign in to comment.