Mercurial > dive4elements > river
changeset 9754:cd07130ded8d 3.2.x
Route GWT client through wiki container
This reduces the need for local configuration changes to get
a working Docker-based setup.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 12 Oct 2022 10:45:13 +0200 |
parents | 7227621f8496 |
children | 0834c2591e14 |
files | artifacts/doc/conf/conf.xml docker/Dockerfile.gwt-client docker/README docker/docker-compose.yml docker/httpd-wiki.conf docker/wikiconfig_local.py |
diffstat | 6 files changed, 29 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- 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>
--- 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"]
--- 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.
--- 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
--- 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
--- 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.