Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring docker-compose.yml to life, 1 master and 1 slave. #22

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bor8
Copy link

@bor8 bor8 commented Apr 29, 2019

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:

git clone --branch master --single-branch https://github.com/bor8/docker-geonetwork.git
cd docker-geonetwork
sudo docker-compose build
sudo docker-compose up -d

(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:

git clone --branch master --single-branch https://github.com/bor8/docker-geonetwork.git
cd docker-geonetwork
sudo docker-compose pull
sudo docker-compose up -d

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).

@bor8 bor8 marked this pull request as ready for review April 30, 2019 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants