Skip to content

Commit 4af662b

Browse files
author
tchapi
committed
Fix Docker-standalone PHP config override
1 parent 7971b39 commit 4af662b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

docker/Dockerfile-standalone

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,12 @@ RUN mkdir -p /var/log/supervisor && mkdir -p /var/log/php-fpm
9999
COPY ./docker/configurations/supervisord.conf /etc/supervisord.conf
100100

101101
# We want to use sockets inside the container between Caddy and PHP-fpm
102+
# NOTE: Creating a custom zzzz-custom.conf overrides the www.conf setting (files are processed alphabetically)
102103
RUN mkdir /var/run/php-fpm && chown -R www-data:www-data /var/run/php-fpm \
103-
&& sed -i 's/listen = /;listen = /' /usr/local/etc/php-fpm.d/www.conf \
104-
&& sed -i 's/listen = 9000/listen = \/var\/run\/php-fpm\/php-fpm.sock/' /usr/local/etc/php-fpm.d/zz-docker.conf
104+
&& { \
105+
echo '[www]'; \
106+
echo 'listen = /var/run/php-fpm/php-fpm.sock'; \
107+
} | tee /usr/local/etc/php-fpm.d/zzzz-custom-docker.conf
105108

106109
RUN mkdir -p ./var/log ./var/cache && chown -R www-data:www-data ./var
107110

0 commit comments

Comments
 (0)