Skip to content

Conversation

@ZakarFin
Copy link

@ZakarFin ZakarFin commented Dec 1, 2025

Apparently documentation has moved to the main repository so I'm suggesting the changes made in geonetwork/doc#248 to be migrated to this documentation. We've been tinkering with GeoNetwork migration from 3.x to 4.x for some time now and looking at the code I noticed these configuration options as well. Also noticed that the indexes are by default prefixed with gn- (https://github.com/geonetwork/core-geonetwork/blob/4.2.13/pom.xml#L1565-L1569).

I'm not sure if you want to have links to source code in the documentation or if the defaults are different in the prepackaged versions of WAR-file or the Containerized setup. These are the ones that are defaulted when building from source. As we are migrating to 4.2.x before continuing to go for 4.4.x things might have changed, but at least raising awareness for someone more experienced with GN to take a look at the docs.

Maybe also take a look at this: geonetwork/doc#249 as it seems the path to encryptor.properties on the docs was wrong (in our experience).

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@github-project-automation github-project-automation bot moved this to Documentation ideas in Documentation Dec 1, 2025
@jodygarnett jodygarnett moved this from Documentation ideas to Review required in Documentation Dec 1, 2025
## Configuring a database via config files

The database dialect is configured in **`/WEB-INF/config-node/srv.xml`**. Uncomment the dialect to use.
The database dialect is configured in **`/WEB-INF/config-node/srv.xml`**. Uncomment the dialect to use or use Java System property to configure it with `-Dgeonetwork.db.type=postgres` as described in https://github.com/geonetwork/core-geonetwork/blob/4.2.13/web/src/main/webResources/WEB-INF/config-node/srv.xml#L36.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The database dialect is configured in **`/WEB-INF/config-node/srv.xml`**. Uncomment the dialect to use or use Java System property to configure it with `-Dgeonetwork.db.type=postgres` as described in https://github.com/geonetwork/core-geonetwork/blob/4.2.13/web/src/main/webResources/WEB-INF/config-node/srv.xml#L36.
The database dialect is configured in **`/WEB-INF/config-node/srv.xml`**. Uncomment the dialect to use or use Java System property to configure it with `-Dgeonetwork.db.type=postgres` as described in https://github.com/geonetwork/core-geonetwork/blob/e8cee088ca714789788d9de0cb8f143d09a8e9ba/web/src/main/webResources/WEB-INF/config-node/srv.xml#L36.

Use a link to main branch.

Alternative environment variables are also supported for non-container (WAR-file) environments:

``` text
GEONETWORK_DB_USERNAME=example
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would document also GEONETWORK_DB_TYPE

GEONETWORK_DB_PORT=5432
```

Based on compile-time default settings: https://github.com/geonetwork/core-geonetwork/blob/4.2.13/pom.xml#L1515-L1520 that are used to set these https://github.com/geonetwork/core-geonetwork/blob/4.2.13/web/src/main/webResources/WEB-INF/config-db/jdbc.properties#L24-L28.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Based on compile-time default settings: https://github.com/geonetwork/core-geonetwork/blob/4.2.13/pom.xml#L1515-L1520 that are used to set these https://github.com/geonetwork/core-geonetwork/blob/4.2.13/web/src/main/webResources/WEB-INF/config-db/jdbc.properties#L24-L28.
Based on compile-time default settings: https://github.com/geonetwork/core-geonetwork/blob/e8cee088ca714789788d9de0cb8f143d09a8e9ba/pom.xml#L1556-L1562 that are used to set these https://github.com/geonetwork/core-geonetwork/blob/e8cee088ca714789788d9de0cb8f143d09a8e9ba/web/src/main/webResources/WEB-INF/config-db/jdbc.properties#L24-L28

Use links to main branch.

@josegar74 josegar74 added this to the 4.4.10 milestone Feb 3, 2026
@jodygarnett
Copy link
Contributor

Thanks @ZakarFin - see also #9158 as I clean up the doc PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review required

Development

Successfully merging this pull request may close these issues.

3 participants