This commit is contained in:
William 2022-12-29 02:29:47 +00:00
parent f696c2505a
commit 4cbbe1a210
2 changed files with 13 additions and 9 deletions

View File

@ -2,7 +2,7 @@ FROM alpine:latest
# Nginx package is available in the Alpine Linux repositories. To install it run:
RUN apk update && \
apk add nginx php-fpm
apk add nginx php-fpm81
# Creating new user and group 'www' for nginx
RUN adduser -D -g 'www' www
@ -14,4 +14,7 @@ RUN mkdir /www && \
COPY nginx.conf /etc/nginx/nginx.conf
CMD ["nginx"]
COPY ../ /www
USER www
CMD ["nginx && php-fpm81 && sleep infinity"]

View File

@ -1,7 +1,8 @@
user www;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
#error_log /var/log/nginx/error.log warn;
error_log /dev/null warn;
pid /var/run/nginx/nginx.pid;
events {
@ -12,22 +13,22 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
access_log /var/log/nginx/access.log;
access_log off;
keepalive_timeout 3000;
server {
listen 8080;
root /www;
root /www/public;
index index.html index.htm index.php;
server_name localhost;
client_max_body_size 32m;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/lib/nginx/html;
root /var/lib/nginx/html;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}
}