Skip to content

Docker Compose: add app service to observability stack #22

@cchinchilla-dev

Description

@cchinchilla-dev

Summary

Extend the existing deploy/docker-compose.yml to include the agentloom container alongside the observability stack (OTel Collector, Prometheus, Jaeger, Grafana).

Motivation

Currently docker compose up -d only starts the observability stack. Users must run agentloom separately on the host. Adding the app service enables a single command to run a workflow with full observability — traces in Jaeger, metrics in Grafana.

Implementation

Changes to deploy/docker-compose.yml

  1. Add agentloom service:

    agentloom:
      build:
        context: ..
        dockerfile: Dockerfile
        args:
          BUILD_OBSERVABILITY: "true"
      environment:
        - OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
        - OLLAMA_BASE_URL=http://host.docker.internal:11434
      volumes:
        - ../examples:/workflows:ro
      profiles: ["run"]
      depends_on:
        - otel-collector
      networks:
        - agentloom
  2. Add shared network to all existing services:

    networks:
      agentloom:

    Each existing service (otel-collector, jaeger, prometheus, grafana, renderer) gets networks: [agentloom].

  3. profiles: ["run"] is critical — the agentloom service does NOT auto-start with docker compose up -d. Users invoke it explicitly:

    docker compose run --rm agentloom run /workflows/01_simple_qa.yaml

Makefile additions

docker-build:
	docker build -t agentloom:local .

docker-build-obs:
	docker build --build-arg BUILD_OBSERVABILITY=true -t agentloom:local-obs .

docker-run:
	docker run --rm -v $(PWD)/examples:/workflows agentloom:local run /workflows/$(WORKFLOW)

docker-stack:
	cd deploy && docker compose up -d

docker-stack-down:
	cd deploy && docker compose down

Usage

# Start observability stack
cd deploy && docker compose up -d

# Run a workflow with traces/metrics flowing to the stack
docker compose run --rm agentloom run /workflows/01_simple_qa.yaml

# Check traces in Jaeger: http://localhost:16686
# Check metrics in Grafana: http://localhost:3000

Acceptance criteria

  • docker compose up -d starts only the observability stack (agentloom does NOT start)
  • docker compose run --rm agentloom validate /workflows/01_simple_qa.yaml exits 0
  • agentloom container can reach otel-collector via hostname
  • Makefile targets work

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinfrastructureDeployment, Docker, K8s, Helm, Terraform

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions