Fix php-fpm container, and add logging to php-fpm

master
eater 5 years ago
parent 360e628848
commit f60e950d89
Signed by: eater
GPG Key ID: 656785D50BE51C0A

@ -1,11 +1,17 @@
user www www; user www www;
worker_processes auto; worker_processes auto;
error_log /dev/stderr info;
events { events {
worker_connections 1024; worker_connections 1024;
} }
http { http {
log_format main '$remote_addr - $remote_user - [$host][$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/stdout main;
include mime.types; include mime.types;
default_type application/octet-stream; default_type application/octet-stream;
sendfile on; sendfile on;
@ -13,7 +19,7 @@ http {
gzip on; gzip on;
# Secure SSL Settings, source: https://cipherli.st/ # Secure SSL Settings, source: https://cipherli.st/
ssl_protocols TLSv1.3; ssl_protocols TLSv1.3 TLSv1.2;
ssl_prefer_server_ciphers on; ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/dhparam.pem; ssl_dhparam /etc/nginx/dhparam.pem;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384; ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;
@ -29,8 +35,7 @@ http {
add_header X-XSS-Protection "1; mode=block"; add_header X-XSS-Protection "1; mode=block";
server { server {
listen 80; listen 80 default_server;
listen 443 ssl;
root /sites/default; root /sites/default;
} }

@ -1,6 +1,7 @@
FROM d.xr.to/php FROM d.xr.to/php
RUN xbps-install -Sy php-fpm RUN xbps-install -Sy php-fpm
RUN useradd -rU www -u 444 RUN useradd -rU www -u 444
RUN sed 's:\(user\|group\)\s*=\s*http:\1 = www:' RUN mkdir /var/log
RUN sed -i 's:\(user\|group\)\s*=\s*http:\1 = www:;s:127\.0\.0\.1\:9000:9000:;s:\;error_log\s*=.+:error_log = /dev/stderr:;' /etc/php/php-fpm.conf /etc/php/php-fpm.d/www.conf
EXPOSE 9000/tcp EXPOSE 9000/tcp
CMD ["/usr/bin/php-fpm", "--nodaemonize"] CMD ["/usr/bin/php-fpm", "--nodaemonize"]

Loading…
Cancel
Save