Bring docker-compose.yml to life, 1 master and 1 slave. #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, first I wanted to do this PR in the main repo core-geonetwork: geonetwork/core-geonetwork#3775. At PascalLike's suggestion, now here.
(I think it makes sense to follow up on the documentary, too: https://github.com/docker-library/docs/blob/master/geonetwork/README.md. Let's see when I can do this.)
I brought in Docker Compose with this Commit. I also removed the postgres folder (the
restart: always
guarantees that the database does not have to be booted when Geonetwork starts (again)!), added HTTP proxy support, and added construction of the war file via Maven.It can do no harm to change the password in the docker-compose.yml file.
A master and a slave can be created with:
(The sudo is not necessary if you have configured your system correctly:
sudo usermod -aG docker <USERNAME>
plus logout and login.)It takes a while until the master and slave are built. Especially downloading the Maven files takes years.
Alternatively, if you want it to go faster and you don't want to build it yourself:
If everything worked out, you can open master with http://localhost:8080/geonetwork/ and slave with http://localhost:4567/geonetwork/.
The slave automatically retrieves the latest data from the master every half hour.
Tested on Docker 18.09.5 and Docker-Compose 1.24.0 without HTTP proxy (but if necessary you only have to modify the .env and apt.conf files).