Skip to content
Snippets Groups Projects
Commit f83298e9 authored by Igor Witz's avatar Igor Witz
Browse files

Update pica-dokuwiki/Dockerfile, pica-dokuwiki/docker-compose.yml,...

Update pica-dokuwiki/Dockerfile, pica-dokuwiki/docker-compose.yml, pica-dokuwiki/entrypoint.sh, pica-dokuwiki/nginx.conf, pica-dokuwiki/run.sh files
parent 98142c90
No related branches found
No related tags found
1 merge request!22Ajout de la CI pour Etherpad et Dokuwiki
FROM registry.picasoft.net:5000/pica-nginx
MAINTAINER antoine@barbare.me
FROM nginx
LABEL maintainer="antoine@barbare.me"
RUN cd /var/www && \
WORKDIR /var/www
RUN apt-get update -y \
apt-get install -y \
curl \
tar \
php7.0 \
php7.0-fpm \
php7.0-gd \
php7.0-xml; \
mkdir -p html; \
chown -R nginx:nginx /var/www/html
USER nginx
COPY nginx.conf /etc/nginx/nginx.conf
RUN echo "cgi.fix_pathinfo = 0;" >> /etc/php/7.0/fpm/php.ini; \
sed -i -e "s|;daemonize\s*=\s*yes|daemonize = no|g" /etc/php/7.0/fpm/php-fpm.conf; \
sed -i -e "s|listen\s*=\s*127\.0\.0\.1:9000|listen = /var/run/php-fpm7.sock|g" /etc/php/7.0/fpm/pool.d/www.conf; \
sed -i -e "s|;listen\.owner\s*=\s*|listen.owner = |g" /etc/php/7.0/fpm/pool.d/www.conf; \
sed -i -e "s|;listen\.group\s*=\s*|listen.group = |g" /etc/php/7.0/fpm/pool.d/www.conf; \
sed -i -e "s|;listen\.mode\s*=\s*|listen.mode = |g" /etc/php/7.0/fpm/pool.d/www.conf; \
curl -O -L "https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz" && \
tar -xzf dokuwiki-stable.tgz -C html --strip-components 1 && \
rm -Rf dokuwiki*
COPY nginx.conf /etc/nginx/nginx.conf
COPY entrypoint.sh /entrypoint.sh
USER root
RUN apt-get remove -y tar && \
apt-get -y autoclean && \
apt-get -y clean && \
apt-get -y autoremove
USER nginx
EXPOSE 80
VOLUME ["/var/www/html"]
HEALTHCHECK CMD curl -s 127.0.0.1:${DOKUWIKI_PORT:=80}
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
COPY run.sh /run.sh
CMD ["run.sh"]
\ No newline at end of file
#!/bin/bash
MAX_UPLOAD_SIZE=${MAX_UPLOAD_SIZE:-10M}
sed -i "s/\${MAXSIZE}/$MAX_UPLOAD_SIZE/g" /etc/nginx/nginx.conf
/start.sh
sed -i "s/\${MAXSIZE}/$MAX_UPLOAD_SIZE/g" /etc/nginx/nginx.conf
\ No newline at end of file
......@@ -62,4 +62,4 @@ http {
deny all;
}
}
}
}
\ No newline at end of file
#!/bin/bash
# EXPLAINING THE SCRIPT run.sh
# This is a poor man's supervisord. The only thing this script does is watching its forked (background) processes and as soon as one dies, it terminates all the others and exits with the code of the first dying process.
# see : https://github.com/dinkel/docker-nginx-phpfpm
set -m
php7.0-fpm &
nginx -g "daemon off;" &
pids=`jobs -p`
exitcode=0
function terminate() {
trap "" CHLD
for pid in $pids; do
if ! kill -0 $pid 2>/dev/null; then
wait $pid
exitcode=$?
fi
done
kill $pids 2>/dev/null
}
trap terminate CHLD
wait
exit $exitcode
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment