This commit is contained in:
Shihaam Abdul Rahman 2023-10-14 23:53:54 +05:00
commit 194c5e43b7
Signed by: shihaam
GPG Key ID: 6DA2E87EBC227636
4 changed files with 56 additions and 0 deletions

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM nginx
# Install basic tools
RUN apt update \
&& apt install curl nano iputils-ping zip unzip -y --no-install-recommends \
&& apt auto-remove -y \
&& apt clean -y
COPY nginx.conf /etc/nginx/conf.d/default.conf
WORKDIR /etc/nginx

4
README.md Normal file
View File

@ -0,0 +1,4 @@
# NGINX-FPM
Bacically base nginx image with support for fpm
This container is meant to be used with php-containers!

18
docker-compose.yml Normal file
View File

@ -0,0 +1,18 @@
version: '3.5'
services:
#########################
nginx:
build:
context: .
dockerfile: Dockerfile
x-bake:
pull: true
platforms:
- linux/amd64/v1
- linux/amd64/v2
- linux/amd64/v3
- linux/arm/v7
- linux/arm64
hostname: nginx
platform: linux/amd64/v3
image: git.shihaam.dev/dockerfiles/nginx-fpm:latest

24
nginx.conf Normal file
View File

@ -0,0 +1,24 @@
server {
listen 80;
server_name _;
access_log /dev/stdout;
error_log /dev/stdout info;
root /var/www/html/public;
index index.php;
client_max_body_size 5M;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ [^/]\.php(/|$) {
fastcgi_pass fpm:9000;
include fastcgi_params;
#fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
}