mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-05-15 22:16:29 +02:00
update dokuwiki
This commit is contained in:
parent
72a92788d5
commit
2dbe402e26
@ -1,19 +1,18 @@
|
|||||||
#
|
#
|
||||||
# Dockerfile for DokuWiki
|
# Dockerfile for dokuwiki
|
||||||
#
|
|
||||||
# References
|
|
||||||
# - https://github.com/docker-library/drupal/blob/master/8/Dockerfile
|
|
||||||
# - https://www.dokuwiki.org/faq:backup
|
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM php:5.6-apache
|
FROM alpine
|
||||||
MAINTAINER kev <noreply@datageek.info>
|
MAINTAINER kev <noreply@datageek.info>
|
||||||
|
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
RUN a2enmod rewrite
|
RUN apk add -U nginx php-fpm tar \
|
||||||
RUN curl "http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz" | tar xz --strip 1
|
&& wget -O- http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz | tar xz --strip 1 \
|
||||||
RUN chown -R www-data:www-data .
|
&& chown -R nobody:nobody . \
|
||||||
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
VOLUME /var/www/html/data/pages \
|
VOLUME /var/www/html/data/pages \
|
||||||
/var/www/html/data/meta \
|
/var/www/html/data/meta \
|
||||||
@ -23,3 +22,6 @@ VOLUME /var/www/html/data/pages \
|
|||||||
/var/www/html/data/attic \
|
/var/www/html/data/attic \
|
||||||
/var/www/html/conf
|
/var/www/html/conf
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD php-fpm && nginx -g 'daemon off;'
|
||||||
|
25
dokuwiki/Dockerfile.debian
Normal file
25
dokuwiki/Dockerfile.debian
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#
|
||||||
|
# Dockerfile for DokuWiki
|
||||||
|
#
|
||||||
|
# References
|
||||||
|
# - https://github.com/docker-library/drupal/blob/master/8/Dockerfile
|
||||||
|
# - https://www.dokuwiki.org/faq:backup
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM php:5.6-apache
|
||||||
|
MAINTAINER kev <noreply@datageek.info>
|
||||||
|
|
||||||
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
|
RUN a2enmod rewrite
|
||||||
|
RUN curl "http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz" | tar xz --strip 1
|
||||||
|
RUN chown -R www-data:www-data .
|
||||||
|
|
||||||
|
VOLUME /var/www/html/data/pages \
|
||||||
|
/var/www/html/data/meta \
|
||||||
|
/var/www/html/data/media \
|
||||||
|
/var/www/html/data/media_attic \
|
||||||
|
/var/www/html/data/media_meta \
|
||||||
|
/var/www/html/data/attic \
|
||||||
|
/var/www/html/conf
|
||||||
|
|
49
dokuwiki/nginx.conf
Normal file
49
dokuwiki/nginx.conf
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
worker_processes 4;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
client_max_body_size 4M;
|
||||||
|
client_body_buffer_size 128k;
|
||||||
|
|
||||||
|
root /var/www/html;
|
||||||
|
index doku.php;
|
||||||
|
|
||||||
|
location ~ /(data/|conf/|bin/|inc/) { deny all; }
|
||||||
|
|
||||||
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
||||||
|
expires 31536000s;
|
||||||
|
add_header Pragma "public";
|
||||||
|
add_header Cache-Control "max-age=31536000, public, must-revalidate, proxy-revalidate";
|
||||||
|
log_not_found off;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / { 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&$args last;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
try_files $uri $uri/ /doku.php;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param REDIRECT_STATUS 200;
|
||||||
|
fastcgi_pass 127.0.0.1:9000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user