Before you begin, make sure you have the following software installed on your machine:
- Docker: Install Docker on your machine.
- Docker Compose: Install Docker Compose on your machine.
To get started, follow these steps:
- Clone the repository containing the docker-compose.yml file to your local machine.
- Navigate to the directory where the docker-compose.yml file is located.
- Open a terminal or command prompt in that directory.
- Run the following command to start the Docker containers:
docker-compose up
The docker-compose.yml file defines three services: mongodb-target, mongodb-metadata, and maggregor. Each service is configured with its own settings, such as image name, container name, ports, and environment variables.
Environment Variable | Description |
---|---|
PROXY_PORT | The port number on which the maggregor server will listen for incoming proxy requests to MongoDB. |
HTTP_PORT | The port number on which the maggregor server will listen for HTTP requests for API and UI. |
MONGODB_TARGET_URI | The URI of the target MongoDB server to which the requests will be forwarded. |
MONGODB_METADATA_URI | The URI of the MongoDB server where metadata used by maggregor will be used (optional). |
You can configure the application by modifying the docker-compose.yml file according to your requirements. For example, you can change the port mappings or update the environment variables to connect to your own MongoDB instances.
Directory | Description |
---|---|
src/core |
The core database package (cached aggregations) |
src/parser |
A MongoDB aggregation query parser |
src/server |
Proxy the MongoDB Wire Protocol and intercepts Aggregation Pipeline queries |