This commit is contained in:
William 2022-12-29 03:49:24 +00:00
parent c37a313924
commit 821e9eef78
5 changed files with 12 additions and 18 deletions

View File

@ -1,13 +1,10 @@
FROM alpine:latest
# Nginx package is available in the Alpine Linux repositories. To install it run:
RUN apk update && \
apk add nginx php81-fpm
# Creating new user and group 'www' for nginx
RUN adduser -D -g 'www' www
# Create a directory for html files
RUN mkdir /www && \
chown -R www:www /var/lib/nginx && \
chown -R www:www /www

View File

@ -2,6 +2,6 @@
Made by yours truly
# Setup
# Docker install
See [docker/README.md](./docker/README.md)
docker build --no-cache -f ./docker/Dockerfile --tag willy-club-website

View File

@ -1,3 +0,0 @@
# Docker install
docker build --no-cache -f ./docker/Dockerfile --tag willy-club-website

View File

@ -1,8 +1,7 @@
user www;
worker_processes 1;
#error_log /var/log/nginx/error.log warn;
error_log /dev/null warn;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx/nginx.pid;
events {
@ -15,22 +14,23 @@ http {
sendfile on;
access_log off;
keepalive_timeout 3000;
server_tokens off;
server {
listen 8080;
root /www/public;
index index.html index.htm index.php;
index 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;
}
error_page 404 /index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}

View File

@ -1,2 +1,2 @@
#!/bin/sh
nginx && php-fpm81 && read var
nginx && php-fpm81 && tail -f /var/log/nginx/error.log