From ade48825a1f886af7b4ee2a718a8fbc084f99752 Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 24 Jan 2022 11:11:33 +0800 Subject: [PATCH] update dokuwiki --- README.md | 1 - dokuwiki/Dockerfile | 17 ++++++----- dokuwiki/Dockerfile.debian | 6 ++-- dokuwiki/arm/Dockerfile | 40 ------------------------- dokuwiki/arm/docker-compose.yml | 5 ---- dokuwiki/arm/nginx.conf | 53 --------------------------------- dokuwiki/docker-compose.yml | 12 ++++---- dokuwiki/nginx.conf | 2 ++ 8 files changed, 21 insertions(+), 115 deletions(-) delete mode 100644 dokuwiki/arm/Dockerfile delete mode 100644 dokuwiki/arm/docker-compose.yml delete mode 100644 dokuwiki/arm/nginx.conf diff --git a/README.md b/README.md index d32b0b2..d7419ec 100644 --- a/README.md +++ b/README.md @@ -193,7 +193,6 @@ A collection of delicious docker recipes. - [x] ~discuz~ :cn: :skull: - [x] django-cms - [x] dokuwiki :+1: -- [x] dokuwiki-arm :+1: - [x] gogs-arm :cn: - [x] hugo - [x] hugo-arm diff --git a/dokuwiki/Dockerfile b/dokuwiki/Dockerfile index 97187c6..61e4b01 100644 --- a/dokuwiki/Dockerfile +++ b/dokuwiki/Dockerfile @@ -13,13 +13,14 @@ RUN set -xe \ gzip \ nginx \ openssl \ - php7-fpm \ - php7-json \ - php7-openssl \ - php7-pdo_sqlite \ - php7-sqlite3 \ - php7-xml \ - php7-zlib \ + php8-fpm \ + php8-json \ + php8-openssl \ + php8-pdo_sqlite \ + php8-session \ + php8-sqlite3 \ + php8-xml \ + php8-zlib \ tar \ && wget -O- http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz | tar xz --strip 1 \ && chown -R nobody:nobody . @@ -37,4 +38,4 @@ VOLUME /var/www/html/conf \ EXPOSE 80 -CMD php-fpm7 && nginx -g 'daemon off;' +CMD php-fpm8 && nginx -g 'daemon off;' diff --git a/dokuwiki/Dockerfile.debian b/dokuwiki/Dockerfile.debian index b302465..f7f7796 100644 --- a/dokuwiki/Dockerfile.debian +++ b/dokuwiki/Dockerfile.debian @@ -6,13 +6,13 @@ # - https://www.dokuwiki.org/faq:backup # -FROM php:5.6-apache -MAINTAINER kev +FROM php:8-apache +MAINTAINER EasyPi Software Foundation WORKDIR /var/www/html RUN a2enmod rewrite -RUN curl "http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz" | tar xz --strip 1 +RUN curl -sSL "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 \ diff --git a/dokuwiki/arm/Dockerfile b/dokuwiki/arm/Dockerfile deleted file mode 100644 index add4f10..0000000 --- a/dokuwiki/arm/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -# -# Dockerfile for dokuwiki-arm -# - -FROM easypi/alpine-arm -MAINTAINER EasyPi Software Foundation - -WORKDIR /var/www/html - -RUN set -xe \ - && apk add --no-cache \ - ca-certificates \ - gzip \ - nginx \ - openssl \ - php7-fpm \ - php7-json \ - php7-openssl \ - php7-pdo_sqlite \ - php7-sqlite3 \ - php7-xml \ - php7-zlib \ - tar \ - && wget -O- http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz | tar xz --strip 1 \ - && chown -R nobody:nobody . - -COPY nginx.conf /etc/nginx/nginx.conf - -VOLUME /var/www/html/conf \ - /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/lib/plugins - -EXPOSE 80 - -CMD php-fpm5 && nginx -g 'daemon off;' diff --git a/dokuwiki/arm/docker-compose.yml b/dokuwiki/arm/docker-compose.yml deleted file mode 100644 index b0d8c79..0000000 --- a/dokuwiki/arm/docker-compose.yml +++ /dev/null @@ -1,5 +0,0 @@ -dokuwiki: - image: easypi/dokuwiki-arm - ports: - - "8000:80" - restart: always diff --git a/dokuwiki/arm/nginx.conf b/dokuwiki/arm/nginx.conf deleted file mode 100644 index 7a213dd..0000000 --- a/dokuwiki/arm/nginx.conf +++ /dev/null @@ -1,53 +0,0 @@ -user nginx; -worker_processes 4; -pid /run/nginx.pid; - -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; - } - } -} diff --git a/dokuwiki/docker-compose.yml b/dokuwiki/docker-compose.yml index 75e3909..dd036e1 100644 --- a/dokuwiki/docker-compose.yml +++ b/dokuwiki/docker-compose.yml @@ -1,5 +1,7 @@ -dokuwiki: - image: vimagick/dokuwiki - ports: - - "8000:80" - restart: always +version: "3.8" +services: + dokuwiki: + image: vimagick/dokuwiki + ports: + - "8000:80" + restart: unless-stopped diff --git a/dokuwiki/nginx.conf b/dokuwiki/nginx.conf index 7a213dd..41e1cda 100644 --- a/dokuwiki/nginx.conf +++ b/dokuwiki/nginx.conf @@ -1,12 +1,14 @@ user nginx; worker_processes 4; pid /run/nginx.pid; +error_log /dev/stderr info; events { worker_connections 1024; } http { + access_log /dev/stdout; include mime.types; default_type application/octet-stream; sendfile on;