Mongoku is a web-based administrative interface for managing MongoDB databases. Mongoku can be used to view, modify and delete documents.
This tutorial explains how to install Mongoku inside a Docker container in the Linux. Commands have been tested on Ubuntu.
Prepare environment
Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.
You also need to have a running MongoDB container. Instructions can be found in the post.
Install Mongoku
- Host network
Run the following command to create a container for Mongoku that uses host network:
docker run -d --name=mongoku --restart=always --network=host \
-e MONGOKU_DEFAULT_HOST=mongodb://admin:pwd123@127.0.0.1:27017 \
huggingface/mongoku
MongoDB container should run on host network as well.
- User-defined bridge network
User-defined bridge network can be used for listening on different port. By default, Mongoku service is listening on port 3100. It can be changed with -p
option.
docker network create app-net
docker run -d --name=mongoku --restart=always --network=app-net \
-p 8080:3100 \
-e MONGOKU_DEFAULT_HOST=mongodb://admin:pwd123@mongodb:27017 \
huggingface/mongoku
MongoDB container should run on the same user-defined bridge network as well.
Notes:
- Make sure that
MONGOKU_DEFAULT_HOST
contains correct MongoDB admin password. - When user-defined bridge network is used, don't forget to change MongoDB container name which specified in
.MONGOKU_DEFAULT_HOST
Testing Mongoku
Open a web browser and go to http://<IP_ADDRESS>:3100
, where <IP_ADDRESS>
is the IP address of the system.
Uninstall Mongoku
To completely remove Mongoku, remove its container:
docker rm --force mongoku
Remove Mongoku image:
docker rmi huggingface/mongoku
If a user-defined bridge network was created, you can delete it as follows:
docker network rm app-net
Leave a Comment
Cancel reply