Files

83 lines
2.2 KiB
YAML
Raw Permalink Normal View History

services:
# ── OpenTelemetry Collector ──
otel-collector:
container_name: otel-collector
image: otel/opentelemetry-collector-contrib:latest
restart: always
networks:
app-shared-net:
aliases:
- otel-collector
ports:
- '4317:4317' # OTLP gRPC
- '4318:4318' # OTLP HTTP
- '8889:8889' # Prometheus metrics
command:
- '--config=/etc/otel/config.yml'
volumes:
- ../../infra/otel/otel-collector-config.yml:/etc/otel/config.yml:ro
# ── Jaeger (Tracing Backend + Built-in UI) ──
jaeger:
container_name: jaeger
image: jaegertracing/all-in-one:latest
restart: always
networks:
app-shared-net:
aliases:
- jaeger
ports:
- '16686:16686' # Jaeger UI + API
environment:
- COLLECTOR_OTLP_ENABLED=true
- COLLECTOR_ZIPKIN_HOST_PORT=:9411
- METRICS_STORAGE_TYPE=prometheus
- PROMETHEUS_SERVER_URL=http://otel-collector:8889
- LOG_LEVEL=info
# ── Prometheus (Metrics Backend) ──
prometheus:
container_name: prometheus
image: prom/prometheus:latest
restart: always
networks:
app-shared-net:
aliases:
- prometheus
ports:
- '9090:9090'
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
volumes:
- ../../infra/otel/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- /prometheus
- /var/run/docker.sock:/var/run/docker.sock:ro
group_add:
- '988'
# ── Node Exporter (Host Metrics: CPU, RAM, Disk) ──
node-exporter:
container_name: node-exporter
image: prom/node-exporter:latest
restart: always
networks:
app-shared-net:
aliases:
- node-exporter
command:
- '--web.listen-address=0.0.0.0:9100'
- '--path.rootfs=/host'
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
volumes:
- /:/host:ro,rslave
networks:
app-shared-net:
name: app-shared-net
external: true