Prepare and publish Docker container

This commit is contained in:
Fred Boniface 2023-01-13 12:54:56 +00:00
parent eca91fc94d
commit deb0156c1b
5 changed files with 28 additions and 2 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
*.md
*.Dockerfile
.git
.dockerignore

View File

@ -1,2 +0,0 @@
FROM nginx:alpine-slim
COPY . /data

4
nginx.Dockerfile Normal file
View File

@ -0,0 +1,4 @@
FROM nginx:mainline-alpine-slim
COPY . /site
COPY ./nginx.conf /etc/nginx/conf.d/site.conf

View File

@ -0,0 +1,17 @@
server {
index index.php index.html;
server_name fredboniface.co.uk.local;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /site;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass localhost:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}

3
php.Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM php:8.2.1-fpm-alpine
COPY . /site