mirror of
https://github.com/tiennm99/try-loki.git
synced 2026-06-09 10:14:28 +00:00
50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
# Alloy (OpenTelemetry Collector)
|
|
alloy:
|
|
image: otel/opentelemetry-collector:latest
|
|
container_name: alloy
|
|
command: [ "--config=/etc/alloy/config.yaml" ]
|
|
volumes:
|
|
- ./alloy/config.yaml:/etc/alloy/config.yaml
|
|
ports:
|
|
- "4317:4317" # OTLP gRPC
|
|
- "4318:4318" # OTLP HTTP
|
|
- "9090:9090" # Prometheus metrics
|
|
depends_on:
|
|
- loki
|
|
networks:
|
|
- otel-network
|
|
|
|
# Loki (Log Storage)
|
|
loki:
|
|
image: grafana/loki:2.9.2
|
|
container_name: loki
|
|
ports:
|
|
- "3100:3100"
|
|
command: -config.file=/etc/loki/local-config.yaml
|
|
networks:
|
|
- otel-network
|
|
|
|
# Grafana (Visualization)
|
|
grafana:
|
|
image: grafana/grafana:10.1.0
|
|
container_name: grafana
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- GF_AUTH_ANONYMOUS_ENABLED=true
|
|
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
|
|
- GF_AUTH_DISABLE_LOGIN_FORM=true
|
|
volumes:
|
|
- ./grafana/provisioning:/etc/grafana/provisioning
|
|
depends_on:
|
|
- loki
|
|
networks:
|
|
- otel-network
|
|
|
|
networks:
|
|
otel-network:
|
|
driver: bridge
|