version: '3.8'
services:
  tremor:
    image: tremorproject/tremor:0.11
    ports:
      - 4316:4316
    environment:
      - RUST_BACKTRACE=1
      - RUST_LOG=info
    volumes:
      - ./etc/tremor:/etc/tremor:ro
      - ./var/log:/var/log:rw
  # Collector
  otel-collector:
    image: otel/opentelemetry-collector-dev:latest
    command: ["--config=/etc/otel-collector-config.yaml", ""]
    volumes:
      - ./etc/otel/collector.yaml:/etc/otel-collector-config.yaml
    ports:
      - "1888:1888"   # pprof extension
      - "8888:8888"   # Prometheus metrics exposed by the collector
      - "8889:8889"   # Prometheus exporter metrics
      - "13133:13133" # health_check extension
      - "4317"        # OTLP gRPC receiver
      - "55670:55679" # zpages extension
    depends_on:
      - prometheus
      - tremor

  # Prometheus
  prometheus:
    container_name: prometheus
    image: prom/prometheus:latest
    volumes:
      - ./etc/prometheus/config.yaml:/etc/prometheus/prometheus.yml
    ports:
      - "9090:9090"
    depends_on:
      - prompush

  # Prometheus Push Gateway
  prompush:
    container_name: prompush
    image: prom/pushgateway:latest
    ports:
      - "9091:9091"
