Docker Compose manages two background services that the Mesa de Ayuda IA backend depends on: PostgreSQL for persistent conversation history and CRM audit records, and Arize Phoenix for LLM observability and tracing. Both services must be healthy before the FastAPI backend is started.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/geremyjampiersalasgarcia-eng/Caso_Practico_Semillero_IA/llms.txt
Use this file to discover all available pages before exploring further.
Starting services
From the project root, launch only thepostgres and phoenix services in detached mode:
| Service | Role |
|---|---|
postgres | Stores conversation history and CRM opportunity records written by the Action Agent. Backed by PostgreSQL 16 Alpine. |
phoenix | Runs the Arize Phoenix UI for tracing every LLM call, agent step, and retrieval event. All spans from the LangGraph orchestrator appear here in real time. |
The
backend and frontend services defined in docker-compose.yml are intentionally excluded from this command — for local development, those are run outside Docker (Python venv + npm run dev) so that hot-reload and debuggers work seamlessly.Service details
postgres
- Image:
postgres:16-alpine— lightweight Alpine-based PostgreSQL 16 - Container name:
mesa_ayuda_db - Credentials: user
mesa_ayuda_user, passwordmesa_ayuda_pass_2024, databasemesa_ayuda_db - Host port:
5433(mapped from container port5432) — avoids conflicts with any PostgreSQL already running on your machine - Health check: runs
pg_isreadyevery 5 seconds with up to 5 retries before reporting unhealthy
phoenix
- Image:
arizephoenix/phoenix:latest - Container name:
mesa_ayuda_phoenix - UI port:
6006— openhttp://localhost:6006to browse traces - OTLP ports:
4317(gRPC) and4318(HTTP) for OpenTelemetry trace ingestion from the backend
Verifying health
After starting the services, confirm both containers are running andpostgres has passed its health check:
(healthy) in the STATUS column for mesa_ayuda_db. The backend’s SQLAlchemy connection pool will fail if it connects before the pg_isready check passes.
Volume mounts
| Volume / Mount | Type | What is stored |
|---|---|---|
postgres_data | Named Docker volume | All PostgreSQL data files — conversations, CRM records, schema migrations |
./backend/data → /app/data | Bind mount (backend service) | data/chroma_db/ vector collections and data/raw/ source documents |
postgres_data named volume is managed by Docker and persists across container restarts and docker-compose down calls. To wipe the database completely, you must explicitly remove the volume:
./backend/data bind mount is only active when the backend service itself runs inside Docker. In local development, the backend/data/ directory on your filesystem is used directly.
Startup order
Port reference
| Service | Container Port | Host Port | Purpose |
|---|---|---|---|
postgres | 5432 | 5433 | PostgreSQL — conversation history & CRM |
phoenix | 6006 | 6006 | Arize Phoenix observability UI |
phoenix | 4317 | 4317 | OTLP gRPC trace ingestion |
phoenix | 4318 | 4318 | OTLP HTTP trace ingestion |
backend (if containerized) | 8000 | 8000 | FastAPI REST API |
frontend (if containerized) | 3000 | 3000 | Next.js chat UI |
PostgreSQL uses host port 5433 (not the standard 5432) to avoid conflicts with a locally installed PostgreSQL instance. The Inside the Docker network (container-to-container), the standard port
DATABASE_URL in .env must reference port 5433 when connecting from the host:5432 is used: