services: postgres: image: postgres:16-alpine container_name: postgres16 restart: unless-stopped mem_limit: 1g environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: - "5432:5432" volumes: - postgres16-data:/var/lib/postgresql/data pyroscope: image: grafana/pyroscope:1.18.1 container_name: pyroscope command: server restart: unless-stopped mem_limit: 512m ports: - "4040:4040" tempo: image: grafana/tempo:2.8.1 container_name: tempo restart: unless-stopped mem_limit: 512m # The image's user cannot write the anonymous volume behind /var/tempo. user: "0" command: ["-config.file=/etc/tempo.yaml"] ports: - "3200:3200" volumes: - ./tempo.yaml:/etc/tempo.yaml grafana: image: grafana/grafana:12.1.0 container_name: grafana restart: unless-stopped mem_limit: 512m environment: GF_AUTH_ANONYMOUS_ENABLED: "true" GF_AUTH_ANONYMOUS_ORG_ROLE: Admin GF_AUTH_DISABLE_LOGIN_FORM: "true" ports: - "3030:3000" volumes: - ./grafana/datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml otel-collector: image: otel/opentelemetry-collector-contrib:0.147.0 container_name: otel-collector restart: unless-stopped mem_limit: 256m ports: - "4317:4317" # OTLP gRPC - "4318:4318" # OTLP HTTP - "8889:8889" # Prometheus scrape endpoint volumes: - ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml healthcheck: test: ["CMD", "/otelcol-contrib", "--version"] interval: 5s timeout: 5s retries: 5 start_period: 5s prometheus: image: prom/prometheus:v3.10.0 container_name: prometheus restart: unless-stopped mem_limit: 256m ports: - "9090:9090" volumes: - ./prometheus.yml:/etc/prometheus/prometheus.yml - prometheus-data:/prometheus depends_on: otel-collector: condition: service_healthy healthcheck: test: ["CMD", "wget", "--spider", "-q", "http://localhost:9090/-/ready"] interval: 5s timeout: 5s retries: 5 start_period: 5s volumes: postgres16-data: prometheus-data: