mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-25 02:04:06 +02:00
update dokuwiki
This commit is contained in:
parent
be3e27db2e
commit
bfce274e72
@ -1,29 +1,25 @@
|
||||
FROM ubuntu:14.04
|
||||
MAINTAINER Ilya Stepanov <dev@ilyastepanov.com>
|
||||
#
|
||||
# Dockerfile for DokuWiki
|
||||
#
|
||||
# References
|
||||
# - https://github.com/docker-library/drupal/blob/master/8/Dockerfile
|
||||
# - https://www.dokuwiki.org/faq:backup
|
||||
#
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y nginx php5-fpm php5-gd curl && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
FROM php:5.6-apache
|
||||
MAINTAINER kev <noreply@datageek.info>
|
||||
|
||||
RUN mkdir -p /var/www
|
||||
RUN cd /var/www && curl http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz | tar xz --strip 1
|
||||
RUN chown -R www-data:www-data /var/www
|
||||
WORKDIR /var/www/html
|
||||
|
||||
RUN echo "cgi.fix_pathinfo = 0;" >> /etc/php5/fpm/php.ini
|
||||
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
|
||||
RUN rm /etc/nginx/sites-enabled/*
|
||||
ADD dokuwiki.conf /etc/nginx/sites-enabled/
|
||||
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 .
|
||||
|
||||
EXPOSE 80
|
||||
VOLUME [ \
|
||||
"/var/www/data/pages", \
|
||||
"/var/www/data/meta", \
|
||||
"/var/www/data/media", \
|
||||
"/var/www/data/media_attic", \
|
||||
"/var/www/data/media_meta", \
|
||||
"/var/www/data/attic", \
|
||||
"/var/www/conf", \
|
||||
"/var/log" \
|
||||
]
|
||||
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
|
||||
|
||||
CMD /usr/sbin/php5-fpm && /usr/sbin/nginx
|
||||
|
@ -1,22 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Ilya Stepanov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
@ -1,7 +1,7 @@
|
||||
docker-dokuwiki
|
||||
===============
|
||||
|
||||
Docker container image with [DokuWiki](https://www.dokuwiki.org/dokuwiki) and nginx
|
||||
Docker container image with [DokuWiki](https://www.dokuwiki.org/dokuwiki) and apache+php.
|
||||
|
||||
###How to run
|
||||
|
||||
@ -9,7 +9,7 @@ Assume your docker host is localhost and HTTP public port is 8000 (change these
|
||||
|
||||
First, run new dokuwiki container:
|
||||
|
||||
docker run -d -p 8000:80 --name dokuwiki istepanov/dokuwiki
|
||||
docker run -d -p 8000:80 --name dokuwiki vimagick/dokuwiki
|
||||
|
||||
Then setup dokuwiki using installer at URL `http://localhost:8000/install.php`
|
||||
|
||||
@ -24,7 +24,7 @@ To make sure data won't be deleted if container is removed, create an empty cont
|
||||
docker stop dokuwiki && docker rm dokuwiki
|
||||
|
||||
# to restore dokuwiki, create new dokuwiki container and attach dokuwiki-data volume to it
|
||||
docker run -d -p 8000:80 --volumes-from dokuwiki-data --name dokuwiki istepanov/dokuwiki
|
||||
docker run -d -p 8000:80 --volumes-from dokuwiki-data --name dokuwiki vimagick/dokuwiki
|
||||
|
||||
###How to backup data
|
||||
|
||||
@ -34,7 +34,7 @@ To make sure data won't be deleted if container is removed, create an empty cont
|
||||
###How to restore from backup
|
||||
|
||||
#create new dokuwiki container, but don't start it yet
|
||||
docker create -p 8000:80 --name dokuwiki istepanov/dokuwiki
|
||||
docker create -p 8000:80 --name dokuwiki vimagick/dokuwiki
|
||||
|
||||
# create data container for persistency (optional)
|
||||
docker run --volumes-from dokuwiki --name dokuwiki-data busybox
|
||||
|
5
dokuwiki/docker-compose.yml
Normal file
5
dokuwiki/docker-compose.yml
Normal file
@ -0,0 +1,5 @@
|
||||
dokuwiki:
|
||||
image: vimagick/dokuwiki:latest
|
||||
ports:
|
||||
- "8000:80"
|
||||
restart: always
|
@ -1,34 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
root /var/www;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location / {
|
||||
index doku.php;
|
||||
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$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ /(data|conf|bin|inc)/ {
|
||||
deny all;
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
#
|
||||
# Dockerfile for Dokuwiki
|
||||
#
|
||||
|
||||
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/conf", \
|
||||
"/var/www/html/data", \
|
||||
"/var/www/html/lib/plugins" \
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user