This is a docker compose project to create a mongo db cluster with 3 nodes.
- This project is for development purpose only. Do not use it in production.
- Use LF line ending in your editor to avoid errors.
- Clone this repository
- openssl must be installed on your machine
- Run the following command to generate cluster security key
openssl rand -base64 756 > security.key
- export the following environment variable
export DB_PASS=your_db_admin_password
export SYSTEM_PASS=your_system_admin_password
- Run the following command to create mongo cluster containers
docker-compose up -d
- Run the following command to finish cluster configuration
./init-cluster.sh