Clean up dokuwiki dockerfile

This commit is contained in:
Wojciech Kozlowski 2017-09-16 21:06:38 +01:00
parent ae01418637
commit 4d3d336e9b
2 changed files with 33 additions and 6 deletions

View File

@ -3,12 +3,13 @@ FROM debian
ENV HTML_PATH /usr/share/nginx/html
ENV DOKU_VOL /var/dokuwiki-storage
RUN apt update && apt install -y wget php7.0-fpm php7.0-xml nginx
RUN sed -i -e "s|cgi.fix_pathinfo=1|cgi.fix_pathinfo=0|g" /etc/php/7.0/fpm/php.ini
RUN apt update && apt install -y wget php7.0-fpm php7.0-xml nginx supervisor
RUN rm -rf /etc/nginx/sites-enabled/*
RUN rm -rf /etc/nginx/conf.d
ADD nginx-conf.d /etc/nginx/conf.d
RUN sed -i -e "s|cgi.fix_pathinfo=1|cgi.fix_pathinfo=0|g" /etc/php/7.0/fpm/php.ini && \
mkdir /run/php
RUN rm -rf /etc/nginx/sites-enabled/* && \
rm -rf /etc/nginx/conf.d
RUN rm -rf $HTML_PATH && \
mkdir $HTML_PATH && \
@ -34,7 +35,10 @@ RUN rm -rf $HTML_PATH && \
mv $HTML_PATH/conf $DOKU_VOL/conf && \
ln -s $DOKU_VOL/conf $HTML_PATH/conf
ADD nginx-conf.d /etc/nginx/conf.d
ADD supervisord.conf /etc/supervisord.conf
EXPOSE 80
VOLUME ["$DOKU_VOL"]
CMD service php7.0-fpm start && nginx -g "daemon off;"
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]

23
dokuwiki/supervisord.conf Normal file
View File

@ -0,0 +1,23 @@
[supervisord]
nodaemon=true
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
[unix_http_server]
file=/var/run/supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:php]
command=/usr/sbin/php-fpm7.0
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
[program:nginx]
command=/usr/sbin/nginx
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true