changeset 9739:414647dc6936 3.2.x

Add wiki to Docker setup
author Tom Gottfried <tom@intevation.de>
date Tue, 26 Jul 2022 16:56:38 +0200
parents afad1fac70fb
children 8abcb3cdaff1
files docker/Dockerfile.wiki docker/README docker/docker-compose.yml docker/httpd-wiki.conf
diffstat 4 files changed, 67 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docker/Dockerfile.wiki	Tue Jul 26 16:56:38 2022 +0200
@@ -0,0 +1,43 @@
+# Docker file for D4E River documentation wiki
+FROM centos:7
+MAINTAINER tom@intevation.de
+
+# Necessary to run further yum-installs inside Docker container,
+# if not already part of the base image:
+RUN yum -q -y install yum-plugin-ovl && rpm --rebuilddb
+
+# Install prerequisites
+RUN yum -q -y install curl ca-certificates \
+        python-setuptools gcc python-devel xmlsec1-nss-devel libtool-ltdl-devel \
+        httpd mod_wsgi
+WORKDIR /opt/xmlsec
+RUN curl -sL https://pypi.python.org/packages/source/p/pyxmlsec-next/pyxmlsec-next-0.3.1.tar.gz | \
+    tar -xz
+WORKDIR pyxmlsec-next-0.3.1
+RUN echo 3 | python setup.py build install
+
+WORKDIR /opt/wiki
+
+# User for wiki installation and WSGI
+RUN useradd wiki
+RUN chown wiki:wiki .
+USER wiki
+
+# Install MoinMoin
+RUN curl -s https://static.moinmo.in/files/moin-1.9.9.tar.gz | tar -xz
+ENV WIKI /opt/wiki/moin-1.9.9
+
+# Install tool for SSO
+RUN curl -s https://hg.intevation.de/moin/moin-was/archive/default.tar.gz | \
+    tar -xz -C $WIKI/MoinMoin/auth --strip-components=1 moin-was-default/was.py
+
+# Volume for Wiki data
+VOLUME $WIKI/wiki/data
+
+USER root
+
+# httpd config
+ADD httpd-wiki.conf /etc/httpd/conf.d/
+
+EXPOSE 80
+CMD ["/usr/sbin/httpd", "-DFOREGROUND"]
--- a/docker/README	Mon Jul 25 16:21:34 2022 +0200
+++ b/docker/README	Tue Jul 26 16:56:38 2022 +0200
@@ -1,6 +1,8 @@
 Configure:
 _ Change 'localhost' to the hostname of your docker host in
   artifacts/doc/conf/floodmap.xml and artifacts/doc/conf/rivermap.xml
+_ Change 'example.com' to the hostname of your docker host plus ':8082' in
+  artifacts/doc/conf/conf.xml
 
 
 Build and run:
--- a/docker/docker-compose.yml	Mon Jul 25 16:21:34 2022 +0200
+++ b/docker/docker-compose.yml	Tue Jul 26 16:56:38 2022 +0200
@@ -36,6 +36,16 @@
       - mapfiles:/opt/d4e/bin
     ports:
       - 8081:80
+  wiki:
+    container_name: "d4eriver-wiki"
+    build:
+      context: ./
+      dockerfile: ./Dockerfile.wiki
+    image: "d4e/river_wiki"
+    networks:
+      - d4e_river
+    ports:
+      - 8082:80
   client:
     container_name: "d4eriver-client"
     build:
@@ -47,6 +57,7 @@
     depends_on:
       - server
       - mapserv
+      - wiki
     volumes:
       - ../:/opt/d4e/river
     ports:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docker/httpd-wiki.conf	Tue Jul 26 16:56:38 2022 +0200
@@ -0,0 +1,11 @@
+ErrorLog /dev/stderr
+CustomLog /dev/stdout combined
+
+WSGIScriptAlias / /opt/wiki/moin-1.9.9/wiki/server/moin.wsgi
+WSGIDaemonProcess moin user=wiki group=wiki \
+    python-path=/opt/wiki/moin-1.9.9 \
+    processes=5 threads=10 maximum-requests=1000 umask=0007
+WSGIProcessGroup moin
+<Directory /opt/wiki/moin-1.9.9/wiki/server>
+    Require all granted
+</Directory>

http://dive4elements.wald.intevation.org