Skip to content

Docker deployment using local docker compose files

Elena Robu edited this page Jul 15, 2024 · 11 revisions

Use this approach to deploy when you have access to the machine you're trying to run the containers on

Prerequisites on the machine you're going to be launching the containers on:

Your directory structure should look like this:

/somewhere/os-custom-geonetwork
/somewhere/iso19139.gemini23
/somewhere/iso19139.gemini22
/somewhere/iso19139.osmp

Change to the os-custom-geonetwork directory and make a copy of .env-local.sample as .env and fill in the password you'd like to use for the geonetwork user in the database and any other relevant variables.

The same password should be used for both environment variables (i.e. POSTGRES_DB_PASSWORD and POSTGRES_DB_ROPASSWORD). Do not add this file to version control or otherwise publish it

Ensure that COMPOSE_FILE also includes docker-compose-os.yml to apply any OS-specific customisations.

Running docker:

The following command will run docker in quiet mode, i.e. you won't see any logs or errors on the command line. To see logs etc, omit the -d parameter

docker-compose -f docker-compose.yml up -d

To see logs when running docker in quiet mode, run the following in a new command window:

docker-compose logs --follow

GeoNetwork will be available at http://localhost:8080/geonetwork