Docker Compose Installation
Docker Compose Installation
Section titled “Docker Compose Installation”This guide covers installing Mantis using Docker Compose.
Prerequisites
Section titled “Prerequisites”- Docker 24.0+
- Docker Compose 2.20+
- Git
Quick Start
Section titled “Quick Start”1. Clone the Repository
Section titled “1. Clone the Repository”git clone https://github.com/MantisPlatform/mantis.gitcd mantis2. Configure Environment
Section titled “2. Configure Environment”# Copy the example environment filecp .env.example .env
# Edit configurationnano .env3. Generate Certificates
Section titled “3. Generate Certificates”# Generate development certificatesjust dev-certs4. Start Services
Section titled “4. Start Services”# Start all services./docker.sh start
# Or using justjust docker-start5. Run Database Migrations
Section titled “5. Run Database Migrations”./docker.sh db-migrate6. Access Lens
Section titled “6. Access Lens”Open https://localhost:5173 in your browser.
Default credentials:
- Email: admin@mantis.local
- Password: admin123
Docker Compose Profiles
Section titled “Docker Compose Profiles”Mantis uses Docker Compose profiles for different deployment scenarios:
| Profile | Description | Command |
|---|---|---|
| default | Core services | docker compose up |
| dev | Development tools (PgAdmin, etc.) | docker compose --profile dev up |
| ui | Include Lens UI | docker compose --profile ui up |
| with-client | Include Tarsus agent | docker compose --profile with-client up |
| multi-thorax | Multiple Thorax instances | docker compose --profile multi-thorax up |
Service Management
Section titled “Service Management”View Status
Section titled “View Status”./docker.sh status# ordocker compose psView Logs
Section titled “View Logs”# All services./docker.sh logs
# Specific service./docker.sh logs mandibleRestart Services
Section titled “Restart Services”./docker.sh restartStop Services
Section titled “Stop Services”./docker.sh stopConfiguration
Section titled “Configuration”Key Environment Variables
Section titled “Key Environment Variables”# DatabasePOSTGRES_USER=mantisPOSTGRES_PASSWORD=<strong-password>POSTGRES_DB=mantis
# JWT (RS256 — generated by just dev-certs)# Container-internal paths (the host ./.keys/ dir is mounted at /etc/mantis/keys/)MANDIBLE__JWT__PRIVATE_KEY_PATH=/etc/mantis/keys/jwt-private.pemMANDIBLE__JWT__PUBLIC_KEY_PATH=/etc/mantis/keys/jwt-public.pem
# EncryptionMANTIS_ENCRYPTION_KEY=<32-byte-base64-key>See Environment Variables for complete reference.
Health Checks
Section titled “Health Checks”Verify services are healthy:
./docker.sh healthOr check individual endpoints:
# Mandible APIcurl https://localhost:3000/api/v1/health
# Thorax (gRPC health)grpcurl -insecure localhost:50051 grpc.health.v1.Health/CheckTroubleshooting
Section titled “Troubleshooting”Services Won’t Start
Section titled “Services Won’t Start”- Check Docker daemon is running
- Verify ports are available
- Check logs:
./docker.sh logs
Database Connection Issues
Section titled “Database Connection Issues”- Verify PostgreSQL is healthy
- Check
DATABASE_URLconfiguration - Ensure migrations have run
Certificate Errors
Section titled “Certificate Errors”- Regenerate certificates:
just dev-certs - Verify certificate paths in
.env - Check certificate validity dates
Next Steps
Section titled “Next Steps”- Security Overview - Configure security
- Production Checklist - Prepare for production
