Kendis enterprise self-hosted version (Docker, Openshift) comes with an internal MongoDB database. However, in case you need to use an External Database then follow these steps
Kendis only supports MongoDB v 3.6. You need to make sure you are running this particular version of MongoDB.
1. Modify the standard Kendis docker run command and add the additional config parameter -v kendis-config:/var/lib/kendis-config
An example command would be like this
> docker run --restart=always -v kendis-resources:/var/lib/kendis-resources -v kendis-logs:/var/log/kendis-logs -v kendis-backup:/var/lib/kendis-backup -v kendis-data:/var/lib/mongodb -v kendis-config:/var/lib/kendis-config -p 8282:8080 kendisdocker/kendis
2. Now start the Kendis docker with the above command.
3. Once Kendis docker is up and running go to the next step.
4. Go to the kendis-config mapped folder and find the file "app.config"
5. Edit app.config and edit hosted DB properties.
db.host=<IP or DNS address where Mongo DB is accessible >
db.port=27017 (change if it's different)
db.name=<your db name>
db.user=<database user name>
db.password=<database user password>
6. Save the file and close it
7. Now stop the Kendis Docker container
> docker ps
> docker stop <kendis-container-id>
> docker rm <kendis-container-id>
8. Now run the same command that you have in step 1 and it will pick the updated database path. Kendis will now run with this modified DB path and you should see the DB connectivity URL at the command prompt, where you are running the Docker command.
- In case you are running Openshift with multiple Pods, then you must select the external database option explained above, in order to make sure the Pods are sharing the same database.