Overview
The recommended way to deploy MCRIT is using the fully packaged docker-mcrit solution. This approach ensures you have fully compatible versions across all components, including:- MCRIT server and worker processes
- MongoDB database for persistence
- Web frontend for convenient interaction
- Proper networking between components
Docker deployment is the easiest way to get started with MCRIT and is recommended for most users.
Prerequisites
- Docker Engine (20.10 or later)
- Docker Compose (1.29 or later)
- At least 4GB of available RAM
- Sufficient disk space for MongoDB storage
Quick Start
Start the services
- MCRIT Server (API)
- MCRIT Worker (Job processing)
- MongoDB (Data storage)
- MCRIT Web (Frontend interface)
Docker Compose Configuration
Thedocker-compose.yml file orchestrates all MCRIT components. Here’s a typical configuration structure:
- Basic Setup
- With Authentication
Environment Variables
MCRIT components can be configured using environment variables. The most common ones are:Server Configuration
| Variable | Description | Default |
|---|---|---|
STORAGE_SERVER | MongoDB hostname | 127.0.0.1 |
STORAGE_PORT | MongoDB port | 27017 |
STORAGE_MONGODB_DBNAME | Database name | mcrit |
STORAGE_MONGODB_USERNAME | MongoDB username | None |
STORAGE_MONGODB_PASSWORD | MongoDB password | None |
AUTH_TOKEN | API authentication token | "" (disabled) |
Worker Configuration
| Variable | Description | Default |
|---|---|---|
QUEUE_SERVER | MongoDB hostname | 127.0.0.1 |
QUEUE_PORT | MongoDB port | 27017 |
QUEUE_MONGODB_DBNAME | Database name | mcrit |
QUEUE_MONGODB_USERNAME | MongoDB username | None |
QUEUE_MONGODB_PASSWORD | MongoDB password | None |
QUEUE_TIMEOUT | Job timeout in seconds | 300 |
See the Configuration page for a complete list of available configuration options.
Port Mappings
The default port mappings for MCRIT services are:| Service | Internal Port | External Port | Description |
|---|---|---|---|
| MCRIT Server | 8000 | 8000 | REST API endpoint |
| MongoDB | 27017 | 27017 | Database (can be hidden) |
| MCRIT Web | 3000 | 8080 | Web frontend |
Volume Mounts for Persistence
To ensure data persistence across container restarts, mount volumes for:MongoDB Data
Configuration Files
You can mount custom configuration files:Uploaded Files and Results
Managing the Deployment
View Logs
Stop Services
Stop and Remove Data
Update to Latest Version
Scaling Workers
For better performance with large workloads, scale the number of workers:docker-compose.yml:
Resource Limits
Set resource limits to prevent containers from consuming all system resources:Health Checks
Add health checks to ensure services are running properly:Troubleshooting
Server not responding
Server not responding
Check if the server container is running:View server logs:Verify MongoDB connectivity from the server container:
Worker not processing jobs
Worker not processing jobs
Ensure the worker can connect to MongoDB:Check for jobs in the queue by accessing the API:
MongoDB connection refused
MongoDB connection refused
Verify MongoDB is running:Check MongoDB logs:Ensure correct credentials in environment variables if authentication is enabled.
Next Steps
- Configure advanced settings in Configuration
- Learn about Standalone Deployment for non-Docker environments
- Explore the MCRIT CLI for interacting with your instance