geonetwork / docker-geonetwork

Official Docker image repository for GeoNetwork
35 stars 39 forks source link

Release GN v4.4.0 #107

Closed juanluisrp closed 10 months ago

juanluisrp commented 1 year ago

Main changes

Run on Java 11

GeoNetwork 4.4.x use Java 11 (See https://github.com/geonetwork/core-geonetwork/pull/7186)

Improved configuration

Documentation explains how to configure various aspects of the application (eg. root context, database, elasticsearch index, security, ...) using environment variables.

Changes and new options:

Move from Nginx to Traefik

Moving to traefik was mainly motivated for easier setup of the multiple instances configuration (see below). Traefik dashboard is available on http://localhost:8000/ It defines a router to GeoNetwork with a redirect when requesting "/" on http://geonetwork.localhost/ and then load balance to the instances available.

image

Add health check

Add service health check and start services in order (eg. avoid to have error on OGC API Records when the database is empty).

image

Multiple instances configuration (experimental)

The composition allows to start multiple GeoNetwork nodes. eg. to start 2 more instances :

docker-compose --profile scaled up --scale geonetwork-replica=2 -d

image

and traefik will register them as servers for the route

image

Related works

edevosc2c commented 1 year ago

It should be noted that there is a sticky cookie here for forcing the user to use the same geonetwork across his visit: https://github.com/geonetwork/docker-geonetwork/pull/107/files#diff-bed7ab158ecf2f50be93c45dd9ae77da44d0689a155d95771d091515fb6d1ba7R59

If we have 2 geonetwork instances, the requests won't be evenly sent to all the geonetwork instances, in case we have 50% of users stuck to 1 geonetwork sending 80% of the overall requests, then one geonetwork will be overloaded while the other one will be underutilized.

I guess it's inevitable because geonetwork is a stateful app, but that's something the users should be aware of it.

joachimnielandt commented 11 months ago

I have encountered a configuration issue that I can reproduce based on this 4.4.0 setup. The swagger docs for ogc-records-service are not accessible through Geonetwork:

I've tried configuring the context path for ogc-records-service such that it matches /api, and the location for the swagger api itself to match:

However, in that case, the desired path results in a 404: http://localhost:8081/api/openapi/swagger-ui/. Probably not the way to go then. Could you advise on how to get the swaggerui accessible?

fxprunayre commented 11 months ago

However, in that case, the desired path results in a 404: http://localhost:8081/api/openapi/swagger-ui/. Probably not the way to go then. Could you advise on how to get the swaggerui accessible?

Not sure @joachimnielandt . We have to fix it in OGC API Records side and it will not be fixed for 4.4.0.

fxprunayre commented 11 months ago

However, in that case, the desired path results in a 404: http://localhost:8081/api/openapi/swagger-ui/. Probably not the way to go then. Could you advise on how to get the swaggerui accessible?

Checking a bit more, it looks like http://localhost:8080/geonetwork/api/openapi/swagger-ui/ is fine so the issue is when swagger redirect from /openapi to /openapi/swagger-ui/.

juanluisrp commented 10 months ago

Created https://github.com/docker-library/official-images/pull/15618 in official images repo.