Overview
GAIA uses Docker Compose to run databases and services locally. In most cases, you don’t need to run Docker commands directly—mise automatically starts Docker when you run development commands.Docker files are located in
infra/docker/. The setup uses Nx to manage
Docker as a project with its own targets.Quick Start
Recommended: Use mise
nx run docker:docker:up before starting dev servers.
Manual Docker Control
If you need direct Docker control:Using Nx Docker Commands
Services
Core Databases
| Service | Port | Description |
|---|---|---|
| postgres | 5432 | PostgreSQL database (user: postgres, pass: postgres) |
| mongo | 27017 | MongoDB for document storage |
| redis | 6379 | Redis for caching and task queue |
| chromadb | 8080:8000 | Vector database for embeddings |
| rabbitmq | 5672, 15672 | Message broker (AMQP + Management UI) |
Application Services (Profile-based)
| Service | Profile | Description |
|---|---|---|
| gaia-backend | backend, all | FastAPI application on port 8000 |
| arq_worker | worker, all | Background job processor |
Development Tools
| Service | Port | Description |
|---|---|---|
| mongo_express | 8081 | MongoDB web UI (admin/password) |
Profiles
Docker profiles allow running specific service groups:Default (No Profile)
Runs only infrastructure services (databases, queues):Backend Profile
Adds the FastAPI application to infrastructure:All Profile
Runs everything including workers:Production Setup
For production, usedocker-compose.prod.yml:
- Uses pre-built images from GHCR
- No volume mounts for source code
- Optimized for stability over development speed
Data Persistence
Named volumes preserve data across restarts:| Volume | Purpose |
|---|---|
chroma_data | Vector embeddings |
pgdata | PostgreSQL data |
redis_data | Redis cache |
mongo_data | MongoDB documents |
rabbitmq_data | Message queue state |
Reset All Data
Health Checks
All services include health checks:- Databases: Connection/ping tests
- Backend: HTTP
/healthendpoint - RabbitMQ:
rabbitmqctl status
Common Commands
Troubleshooting
Port already in use
Port already in use
Another service is using the port. Stop it or change the port mapping in
docker-compose.yml:
bash lsof -i :8000 # Find what's using port 8000 Container won't start
Container won't start
Check logs for the failing service:
bash docker compose -f infra/docker/docker-compose.yml logs postgres Database connection refused
Database connection refused
Ensure containers are healthy:
bash docker compose -f infra/docker/docker-compose.yml ps Wait for healthy status before
connecting.