Я создаю образ Docker, который запускает NginX и PHP-FPM (с Supervisor). Контейнер запускается как www-data, но сокет PHP-FPM не создается.
Вот мои файлы конфигурации:
www.conf
[www]
listen = /var/run/php/php7.3-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
user = www-data
group = www-data
pm = ondemand
pm.max_children = 72
pm.process_idle_timeout = 10s;
pm.max_requests = 1000
mywebsite.conf
server {
...
location ~ \.php$ {
try_files $uri $uri/ /doku.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
}
...
}
Конфигурация руководителя: PHP-FPM
[program:php-fpm]
command=php-fpm
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
stdout-encoding=utf-8
Конфигурация супервайзера: NginX
[program:nginx]
command=nginx -g "daemon off;"
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
supervisord.conf
[unix_http_server]
file=/opt/run/supervisord.sock ; (the path to the socket file)
username = dummy
password = dummy
[supervisord]
logfile=/var/log/supervisord.log ; (main log file;default $CWD/supervisord.log)
loglevel=info ; (log level;default info; others: debug,warn,trace)
user = www-data
pidfile = /opt/run/supervisord.pid
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///run/supervisord.sock ; use a unix:// URL for a unix socket
username = dummy
password = dummy
[include]
files = /etc/supervisor/conf.d/*.conf
Заранее спасибо