1
0
mirror of https://github.com/Adam-Ant/media-server-in-a-box synced 2024-11-14 00:16:22 +00:00

Add custom PHP image for organizr

This commit is contained in:
Adam Dodman 2017-09-25 15:34:49 +01:00
parent 68dc22e614
commit c87ae6b31a
3 changed files with 38 additions and 1 deletions

View File

@ -85,7 +85,7 @@ services:
- plexpy
php:
image: php:7.0-fpm-alpine
build: php/
working_dir: /www
volumes:
- $VOLDIR/nginx/Organizr:/www

16
php/Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM alpine:3.6
MAINTAINER "Adam Dodman <adam.dodman@gmx.com>"
RUN addgroup -g 82 -S www-data \
&& adduser -u 82 -D -S -G www-data www-data \
&& apk add --no-cache php7-zip php7-curl php7-fpm php7-sqlite3 php7-pdo_sqlite php7-session php7-json php7-simplexml tini \
&& rm /etc/php7/php-fpm.d/*
ADD docker.conf /etc/php7/php-fpm.d/
EXPOSE 9000
CMD ["/sbin/tini","--","php-fpm7"]

21
php/docker.conf Normal file
View File

@ -0,0 +1,21 @@
[global]
error_log = /proc/self/fd/2
daemonize = no
[www]
user = www-data
group = www-data
listen = [::]:9000
; if we send this to /proc/self/fd/1, it never appears
access.log = /proc/self/fd/2
clear_env = no
; Ensure worker stdout and stderr are sent to the main error log.
catch_workers_output = yes
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3