Browse Source

Added dockerfile

dev
Rasmus Rendal 11 months ago
parent
commit
0cdf800da4
2 changed files with 44 additions and 0 deletions
  1. +29
    -0
      Dockerfile
  2. +15
    -0
      default.conf

+ 29
- 0
Dockerfile View File

@@ -0,0 +1,29 @@
from alpine:3.10.1

RUN apk add --no-cache nginx php7-fpm
RUN adduser -D -g 'www' www
RUN mkdir /www
RUN mkdir /run/nginx/
RUN chown -R www:www /www
RUN chown -R www:www /run/nginx
RUN chown -R www:www /var/lib/nginx

ENV PHP_FPM_USER="www"
ENV PHP_FPM_GROUP="www"
ENV PHP_FPM_LISTEN_MODE="0660"
ENV PHP_MEMORY_LIMIT="512M"
ENV PHP_MAX_UPLOAD="50M"
ENV PHP_MAX_FILE_UPLOAD="200"
ENV PHP_MAX_POST="100M"
ENV PHP_DISPLAY_ERRORS="On"
ENV PHP_DISPLAY_STARTUP_ERRORS="On"
ENV PHP_ERROR_REPORTING="E_COMPILE_ERROR\|E_RECOVERABLE_ERROR\|E_ERROR\|E_CORE_ERROR"
ENV PHP_CGI_FIX_PATHINFO=0
ENV TIMEZONE="Europe/Copenhagen"

COPY ./ /www/
RUN rm /www/default.conf /www/Dockerfile
COPY default.conf /etc/nginx/conf.d/default.conf


CMD php-fpm7 -D && nginx -g 'daemon off;'

+ 15
- 0
default.conf View File

@@ -0,0 +1,15 @@
server {
listen 80 default_server;
listen [::]:80 default_server;


root /www;
include /etc/nginx/mime.types;
index index.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}

}

Loading…
Cancel
Save