Docker Guide
This guide covers how to run AgentOps backend services using Docker and Docker Compose. This is the recommended approach for both development and production deployments.Overview
The AgentOps Docker setup includes:- API Server - FastAPI backend service
- Dashboard - Next.js frontend application
- OpenTelemetry Collector - Observability and trace collection
- External Services - Supabase, ClickHouse (configured separately)
Docker Compose Configuration
The maincompose.yaml
file in the /app
directory defines the service architecture:
Quick Start with Docker
1. Prerequisites
- Docker Engine 20.10+
- Docker Compose 2.0+
- Git
2. Clone and Setup
3. Configure Environment Variables
Update your.env
files with your external service credentials:
4. Start Services
5. Verify Services
- API Health: http://localhost:8000/health
- API Docs: http://localhost:8000/redoc
- Dashboard: http://localhost:3000
Docker Commands Reference
Basic Operations
Development Commands
Debugging Commands
Using Just Commands
The project includes ajustfile
with convenient Docker commands:
Service-Specific Configuration
API Service
The API service runs a FastAPI application with the following configuration: Dockerfile highlights:SUPABASE_URL
,SUPABASE_KEY
- Database connectionCLICKHOUSE_HOST
,CLICKHOUSE_PASSWORD
- Analytics databaseLOGGING_LEVEL
- Log verbosity (DEBUG, INFO, WARNING, ERROR)SENTRY_DSN
- Error tracking
Dashboard Service
The Dashboard service runs a Next.js application: Dockerfile highlights:NEXT_PUBLIC_SUPABASE_URL
,NEXT_PUBLIC_SUPABASE_ANON_KEY
- Frontend authNEXT_PUBLIC_APP_URL
- API server URLNEXT_PUBLIC_ENVIRONMENT_TYPE
- Environment (development/production)
OpenTelemetry Collector
The OpenTelemetry Collector is included via a separate compose file:Production Configuration
Environment Variables for Production
Production Docker Compose
For production, you may want to:- Use specific image tags instead of building locally
- Configure resource limits
- Set up health checks
- Use external networks
compose.prod.yaml
):
Troubleshooting
Common Issues
Services won’t start:- Verify external service credentials in
.env
files - Check network connectivity from containers
- Ensure services are accessible from Docker network
Performance Optimization
Resource monitoring:Maintenance
Regular Maintenance Tasks
Monitoring
Next Steps
- Set up monitoring and observability
- Configure production deployment
- Set up backup and recovery
- Configure SSL/TLS certificates