Mercurial > dive4elements > river
changeset 9790:75dc4ea60938 3.2.x
Drop using explicit container names
Compose will generate names for the containers and containers can connect
each other on the network via the service names. This avoids the
unnecessary extra "name space" and prepares the application for usage
with different project names.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 20 Jul 2023 10:25:59 +0200 |
parents | a1399209b0d6 |
children | a00bb9d39c16 |
files | artifacts/doc/conf/backend-db.xml artifacts/doc/conf/seddb-db.xml docker/docker-compose.yml docker/httpd-wiki.conf gwt-client/src/main/webapp/WEB-INF/web.xml |
diffstat | 5 files changed, 10 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/doc/conf/backend-db.xml Thu Jul 20 10:03:06 2023 +0200 +++ b/artifacts/doc/conf/backend-db.xml Thu Jul 20 10:25:59 2023 +0200 @@ -5,7 +5,7 @@ <password>d4e</password> <dialect>org.hibernate.dialect.PostgreSQLDialect</dialect> <driver>org.postgresql.Driver</driver> - <url>jdbc:postgresql://d4eriver-db:5432/</url> + <url>jdbc:postgresql://db:5432/</url> <validation-query>select 1 from rivers</validation-query> <max-wait>30000</max-wait> </backend-database>
--- a/artifacts/doc/conf/seddb-db.xml Thu Jul 20 10:03:06 2023 +0200 +++ b/artifacts/doc/conf/seddb-db.xml Thu Jul 20 10:25:59 2023 +0200 @@ -5,7 +5,7 @@ <password>seddb</password> <dialect>org.hibernate.dialect.PostgreSQLDialect</dialect> <driver>org.postgresql.Driver</driver> - <url>jdbc:postgresql://d4eriver-db:5432/seddb</url> + <url>jdbc:postgresql://db:5432/seddb</url> <validation-query>select 1 from gewaesser</validation-query> <max-wait>30000</max-wait> <!--
--- a/docker/docker-compose.yml Thu Jul 20 10:03:06 2023 +0200 +++ b/docker/docker-compose.yml Thu Jul 20 10:25:59 2023 +0200 @@ -1,13 +1,11 @@ version: "3.5" services: db: - container_name: "d4eriver-db" build: context: ../ dockerfile: ./docker/Dockerfile.db image: "d4e/river_db" - server: - container_name: "d4eriver-artifacts" + artifacts: build: context: ../ dockerfile: ./docker/Dockerfile.artifacts @@ -24,31 +22,28 @@ # ports: # - 8787:8787 mapserv: - container_name: "d4eriver-mapserv" build: context: ./ dockerfile: ./Dockerfile.mapserv image: "d4e/river_mapserv" depends_on: - db - - server + - artifacts volumes: - ./mapserver/cgi-bin:/var/www/cgi-bin - ../artifacts/doc/conf/mapserver:/opt/d4e/bin/conf/mapserver - artifacts-data:/opt/d4e/bin/artifacts-data client: - container_name: "d4eriver-client" build: context: ../ dockerfile: ./docker/Dockerfile.gwt-client image: "d4e/river_client" depends_on: - - server + - artifacts - mapserv volumes: - ../gwt-client/config:/opt/d4e/river/gwt-client/config wiki: - container_name: "d4eriver-wiki" build: context: ./ dockerfile: ./Dockerfile.wiki
--- a/docker/httpd-wiki.conf Thu Jul 20 10:03:06 2023 +0200 +++ b/docker/httpd-wiki.conf Thu Jul 20 10:25:59 2023 +0200 @@ -3,12 +3,12 @@ # GWT client RedirectMatch "^/$" "/d4e-river" -ProxyPass "/d4e-river" "ajp://d4eriver-client:8009/d4e-river" -ProxyPassReverse "/d4e-river" "ajp://d4eriver-client:8009/d4e-river" +ProxyPass "/d4e-river" "ajp://client:8009/d4e-river" +ProxyPassReverse "/d4e-river" "ajp://client:8009/d4e-river" # MapServer -ProxyPass "/cgi-bin" "http://d4eriver-mapserv/cgi-bin" -ProxyPassReverse "/cgi-bin" "http://d4eriver-mapserv/cgi-bin" +ProxyPass "/cgi-bin" "http://mapserv/cgi-bin" +ProxyPassReverse "/cgi-bin" "http://mapserv/cgi-bin" # Wiki WSGIScriptAlias /wiki /opt/wiki/moin-1.9.9/wiki/server/moin.wsgi
--- a/gwt-client/src/main/webapp/WEB-INF/web.xml Thu Jul 20 10:03:06 2023 +0200 +++ b/gwt-client/src/main/webapp/WEB-INF/web.xml Thu Jul 20 10:25:59 2023 +0200 @@ -14,7 +14,7 @@ <context-param> <param-name>server-url</param-name> - <param-value>http://d4eriver-artifacts:8181</param-value> + <param-value>http://artifacts:8181</param-value> </context-param> <context-param>