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

l'image peut être construite et semble fonctionner

parent 0c458775
No related branches found
No related tags found
1 merge request!22Ajout de la CI pour Etherpad et Dokuwiki
Pipeline #31203 failed
FROM nginx
LABEL maintainer="antoine@barbare.me"
COPY nginx.conf /etc/nginx/nginx.conf
WORKDIR /var/www
RUN apt-get update -y && \
apt-get install -y \
curl \
wget \
tar \
php7.0 \
php7.0-fpm \
php7.0-gd \
php7.0-xml \
libidn2-0 && \
mkdir -p html && \
php7.0-xml && \
mkdir -p html /var/run/php && \
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" && \
wget "https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz" && \
tar -xzf dokuwiki-stable.tgz -C html --strip-components 1 && \
rm -f dokuwiki-stable.tgz && \
chown -R nginx:nginx html && \
apt-get remove curl -y && \
apt-get -y autoclean && \
apt-get -y clean && \
apt-get -y autoremove
chown -R www-data . /etc/nginx/nginx.conf && \
sed -i "s/\${MAXSIZE}/100M/g" /etc/nginx/nginx.conf && \
ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log && \
ln -sf /dev/stderr /var/log/php-fpm.log
USER nginx
EXPOSE 80
VOLUME ["/var/www/html"]
HEALTHCHECK CMD wget -q -O /dev/null http://127.0.0.1:${DOKUWIKI_PORT:=80}/
COPY nginx.conf /etc/nginx/nginx.conf
COPY run.sh /
COPY entrypoint.sh /
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
COPY run.sh /run.sh
CMD ["run.sh"]
\ No newline at end of file
......@@ -5,15 +5,13 @@ services:
image: pica-dokuwiki:2018.05
volumes:
- /DATA/docker/wiki/html:/var/www/html
environment:
- MAX_UPLOAD_SIZE=100M
security_opt:
- no-new-privileges
mem_limit: 2048m
cpus: "0.20"
pids_limit: 1024
labels:
- "traefik.frontend.rule=Host:wiki.picasoft.net"
- "traefik.frontend.rule=Host:wiki.test.picasoft.net"
- "traefik.port=80"
- "traefik.enable=true"
restart: always
......
#!/bin/bash
MAX_UPLOAD_SIZE=${MAX_UPLOAD_SIZE:-10M}
sed -i "s/\${MAXSIZE}/$MAX_UPLOAD_SIZE/g" /etc/nginx/nginx.conf
\ No newline at end of file
set -e
chmod +x /run.sh
/run.sh
......@@ -3,7 +3,7 @@ daemon off;
user www-data;
worker_processes 1;
error_log stderr error;
error_log stderr error;
events {
worker_connections 1024;
......@@ -14,13 +14,9 @@ http {
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
......@@ -35,14 +31,7 @@ http {
try_files $uri $uri/ @dokuwiki;
}
#location @dokuwiki {
# rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
# rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
# rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
# rewrite ^/(.*) /doku.php?id=$1 last;
#}
location ~ \.php$ {
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
......@@ -62,4 +51,4 @@ http {
deny all;
}
}
}
\ No newline at end of file
}
......@@ -6,8 +6,8 @@
set -m
php7.0-fpm &
nginx -g "daemon off;" &
php-fpm7.0 &
nginx
pids=`jobs -p`
......@@ -29,4 +29,4 @@ function terminate() {
trap terminate CHLD
wait
exit $exitcode
\ No newline at end of file
exit $exitcode
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