Skip to main content

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 main compose.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

Docker Commands Reference

Basic Operations

Development Commands

Debugging Commands

Using Just Commands

The project includes a justfile with convenient Docker commands:

Service-Specific Configuration

API Service

The API service runs a FastAPI application with the following configuration: Dockerfile highlights:
Key environment variables:
  • SUPABASE_URL, SUPABASE_KEY - Database connection
  • CLICKHOUSE_HOST, CLICKHOUSE_PASSWORD - Analytics database
  • LOGGING_LEVEL - Log verbosity (DEBUG, INFO, WARNING, ERROR)
  • SENTRY_DSN - Error tracking

Dashboard Service

The Dashboard service runs a Next.js application: Dockerfile highlights:
Key environment variables:
  • NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY - Frontend auth
  • NEXT_PUBLIC_APP_URL - API server URL
  • NEXT_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:
  1. Use specific image tags instead of building locally
  2. Configure resource limits
  3. Set up health checks
  4. Use external networks
Example production overrides (compose.prod.yaml):
Run with production config:

Troubleshooting

Common Issues

Services won’t start:
Port conflicts:
Database connection issues:
  • Verify external service credentials in .env files
  • Check network connectivity from containers
  • Ensure services are accessible from Docker network
Build failures:

Performance Optimization

Resource monitoring:
Volume optimization:
Network optimization:

Maintenance

Regular Maintenance Tasks

Monitoring

Next Steps