[PATCH] Add wiki to Docker setup

Wald Commits scm-commit at wald.intevation.org
Tue Jul 26 16:57:20 CEST 2022


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1658847398 -7200
#      Tue Jul 26 16:56:38 2022 +0200
# Branch 3.2.x
# Node ID 414647dc6936b5047296b27c9e3355a02ebc1e49
# Parent  afad1fac70fbebadf7dba4630f7d3dd6f775b7a9
Add wiki to Docker setup

diff -r afad1fac70fb -r 414647dc6936 docker/Dockerfile.wiki
--- /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 at 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"]
diff -r afad1fac70fb -r 414647dc6936 docker/README
--- 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:
diff -r afad1fac70fb -r 414647dc6936 docker/docker-compose.yml
--- 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:
diff -r afad1fac70fb -r 414647dc6936 docker/httpd-wiki.conf
--- /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>


More information about the Dive4Elements-commits mailing list