[PATCH 1 of 2] Route GWT client through wiki container
Wald Commits
scm-commit at wald.intevation.org
Wed Oct 12 12:54:47 CEST 2022
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1665564313 -7200
# Wed Oct 12 10:45:13 2022 +0200
# Branch 3.2.x
# Node ID cd07130ded8dba109713823ce6732481da2654c6
# Parent 7227621f84967d6d395cb9af79b73ec67c007c0c
Route GWT client through wiki container
This reduces the need for local configuration changes to get
a working Docker-based setup.
diff -r 7227621f8496 -r cd07130ded8d artifacts/doc/conf/conf.xml
--- a/artifacts/doc/conf/conf.xml Tue Oct 11 14:02:20 2022 +0200
+++ b/artifacts/doc/conf/conf.xml Wed Oct 12 10:45:13 2022 +0200
@@ -360,6 +360,7 @@
<sediment-density-factor>1.9</sediment-density-factor>
</options>
- <!-- base url for online help. -->
- <help-url>http://example.com</help-url>
+ <!-- Base URL for online help -->
+ <!-- Can be absolute URL or just path if on the same host as client -->
+ <help-url>/wiki</help-url>
</artifact-database>
diff -r 7227621f8496 -r cd07130ded8d docker/Dockerfile.gwt-client
--- a/docker/Dockerfile.gwt-client Tue Oct 11 14:02:20 2022 +0200
+++ b/docker/Dockerfile.gwt-client Wed Oct 12 10:45:13 2022 +0200
@@ -47,5 +47,4 @@
USER tomcat
ADD docker/flys_user_file /usr/share/tomcat/
-EXPOSE 8080
CMD ["/usr/libexec/tomcat/server", "start"]
diff -r 7227621f8496 -r cd07130ded8d docker/README
--- a/docker/README Tue Oct 11 14:02:20 2022 +0200
+++ b/docker/README Wed Oct 12 10:45:13 2022 +0200
@@ -1,8 +1,6 @@
Configure:
_ Change 'localhost' to the hostname of your docker host in
artifacts/doc/conf/conf.xml
-_ Change 'example.com' to the hostname of your docker host plus ':8082' in
- artifacts/doc/conf/conf.xml
_ Add to gwt-client/config/mapfish/config.yaml to enable map printing:
- !dnsMatch
host: <your-host>
@@ -15,7 +13,7 @@
$ docker-compose up
The application should now be accessible on your docker host under
-port 8080 and path /d4e-river (e.g. http://your-host:8080/d4e-river).
+port 8080 (e.g. http://your-host:8080).
See docker/flys_user_file for credentials.
diff -r 7227621f8496 -r cd07130ded8d docker/docker-compose.yml
--- a/docker/docker-compose.yml Tue Oct 11 14:02:20 2022 +0200
+++ b/docker/docker-compose.yml Wed Oct 12 10:45:13 2022 +0200
@@ -38,19 +38,6 @@
- artifacts-data:/opt/d4e/bin/artifacts-data
ports:
- 8081:80
- wiki:
- container_name: "d4eriver-wiki"
- build:
- context: ./
- dockerfile: ./Dockerfile.wiki
- image: "d4e/river_wiki"
- networks:
- - d4e_river
- volumes:
- - wiki-data:/opt/wiki/moin-1.9.9/wiki/data
- - ./wikiconfig_local.py:/opt/wiki/moin-1.9.9/wikiconfig_local.py
- ports:
- - 8082:80
client:
container_name: "d4eriver-client"
build:
@@ -62,11 +49,23 @@
depends_on:
- server
- mapserv
- - wiki
volumes:
- ../gwt-client/config:/opt/d4e/river/gwt-client/config
+ wiki:
+ container_name: "d4eriver-wiki"
+ build:
+ context: ./
+ dockerfile: ./Dockerfile.wiki
+ image: "d4e/river_wiki"
+ networks:
+ - d4e_river
+ depends_on:
+ - client
+ volumes:
+ - wiki-data:/opt/wiki/moin-1.9.9/wiki/data
+ - ./wikiconfig_local.py:/opt/wiki/moin-1.9.9/wikiconfig_local.py
ports:
- - 8080:8080
+ - 8080:80
networks:
d4e_river:
name: d4e_river
diff -r 7227621f8496 -r cd07130ded8d docker/httpd-wiki.conf
--- a/docker/httpd-wiki.conf Tue Oct 11 14:02:20 2022 +0200
+++ b/docker/httpd-wiki.conf Wed Oct 12 10:45:13 2022 +0200
@@ -1,7 +1,13 @@
ErrorLog /dev/stderr
CustomLog /dev/stdout combined
-WSGIScriptAlias / /opt/wiki/moin-1.9.9/wiki/server/moin.wsgi
+# GWT client
+RedirectMatch "^/$" "/d4e-river"
+ProxyPass "/d4e-river" "ajp://d4eriver-client:8009/d4e-river"
+ProxyPassReverse "/d4e-river" "ajp://d4eriver-client:8009/d4e-river"
+
+# Wiki
+WSGIScriptAlias /wiki /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
diff -r 7227621f8496 -r cd07130ded8d docker/wikiconfig_local.py
--- a/docker/wikiconfig_local.py Tue Oct 11 14:02:20 2022 +0200
+++ b/docker/wikiconfig_local.py Wed Oct 12 10:45:13 2022 +0200
@@ -1,7 +1,9 @@
from wikiconfig import LocalConfig
class Config(LocalConfig):
- # Put your local config here respectively replace with something useful:
- configuration_item_1 = 'value1'
+ # Keep path prefix in sync with WSGIScriptAlias in httpd config
+ url_prefix_static = '/wiki/moin_static199'
+
+ # Put your local config here.
# See e.g. https://hg.intevation.de/moin/moin-was/file/tip/README
# for SSO integration.
More information about the Dive4Elements-commits
mailing list