Docker Configuration

GAIA uses Docker Compose to orchestrate multiple services for development. Our setup includes the backend API, databases, message queues, and worker processes.

Quick Start

Start all services:
docker compose up
Start only backend services:
docker compose --profile backend-only up

Service Architecture

Core Services

gaia-backend - Main FastAPI application
  • Port: 8000:80
  • Auto-reload enabled for development
  • Depends on all database services
postgres - Primary database
  • Port: 5432:5432
  • Credentials: postgres/postgres
redis - Caching and task queue
  • Port: 6379:6379
chromadb - Vector database for embeddings
  • Port: 8080:8000
mongo - Document storage
  • Port: 27017:27017

Worker Services

worker - Email and scheduled tasks
  • Uses RabbitMQ for message queuing
  • Environment: WORKER_TYPE=mail_worker
arq_worker - Background job processing
  • Uses Redis for task queue
  • Environment: WORKER_TYPE=arq_worker
rabbitmq - Message broker
  • AMQP Port: 5672:5672
  • Management UI: 15672:15672

Development Tools

mongo_express - MongoDB web interface
  • Port: 8081:8081
  • Credentials: admin/password

Profiles

Docker Compose profiles let you run specific service groups:

Default Profile (Empty)

Runs all services including frontend, backend, databases, workers, and development tools:
docker compose up

Backend Only

Runs backend services, databases, workers, and development tools - excludes the frontend:
docker compose --profile backend-only up
The backend-only profile is recommended for development when you want to run the frontend manually with pnpm dev for faster hot reloading.

Health Checks

All services include health checks for reliable startup:
  • Backend: HTTP health endpoint
  • Databases: Connection tests
  • Workers: Service status checks

Data Persistence

Persistent volumes maintain data across container restarts:
  • chroma_data - Vector embeddings
  • pgdata - PostgreSQL data
  • redis_data - Redis cache
  • mongo_data - MongoDB documents
  • rabbitmq_data - Message queue data

Common Commands

View logs:
docker compose logs -f [service-name]
Rebuild services:
docker compose build
Clean restart:
docker compose down -v
docker compose up
Stop all services:
docker compose down