--- version: "3.9" services: grafana: image: grafana/grafana:${GRAFANA_VERSION:-latest} labels: - "traefik.enable=true" - "traefik.http.routers.grafana.rule=Host(`${GRAFANA_HOST}`)" - "traefik.http.services.grafana.loadbalancer.server.port=3000" expose: - 3000 volumes: - ./grafana/provisioning:/etc/grafana/provisioning - grafana-storage:/var/lib/grafana profiles: - grafana loki: image: grafana/loki:${LOKI_STACK_VERSION} labels: - "traefik.enable=true" - "traefik.http.routers.loki.rule=Host(`${LOKI_HOST}`)" - "traefik.http.services.loki.loadbalancer.server.port=3100" expose: - 3100 volumes: - ./loki:/loki/config command: --config.file=/loki/config/config.yml profiles: - grafana agent: image: grafana/agent:${AGENT_VERSION} environment: WAL_DATA_DIRECTORY: /opt/agent/data CONFIG_FILE_PATH: /etc/agent/agent.yaml AGENT_LOKI_URL: "${AGENT_LOKI_URL}" AGENT_TEMPO_URL: "${AGENT_TEMPO_URL}" volumes: - ./agent:/etc/agent/ - /var/run/docker.sock:/var/run/docker.sock:ro command: - "-config.file=/etc/agent/agent.yaml" - "-config.expand-env" profiles: - agent tempo: image: grafana/tempo:${TEMPO_VERSION} command: - "-config.file=${TEMPO_CONFIG_FILE:-/etc/tempo/tempo.yml}" - "-config.expand-env=true" expose: - 3200 # tempo - 9095 # tempo grpc - 4317 # otlp grpc - 4318 # otlp http environment: TEMPO_SERVER_LOG_LEVEL: ${TEMPO_SERVER_LOG_LEVEL:-info} TEMPO_STORAGE_PATH: ${TEMPO_STORAGE_PATH:-/opt/tempo} TEMPO_PROMETHEUS_URL: ${TEMPO_PROMETHEUS_URL} volumes: - ./tempo:/etc/tempo - tempo-local-storage:${TEMPO_STORAGE_PATH:-/opt/tempo} profiles: - tempo prometheus: image: prom/prometheus:${PROMETHEUS_VERSION} labels: - "traefik.enable=true" - "traefik.http.routers.prometheus.rule=Host(`${PROMETHEUS_HOST}`)" - "traefik.http.services.prometheus.loadbalancer.server.port=9090" command: - '--config.file=/etc/prometheus/prometheus.yml' - '--storage.tsdb.path=/prometheus' - '--storage.tsdb.retention.time=${PROMETHEUS_RETENTION_TIME:-10d}' - '--web.console.libraries=/usr/share/prometheus/console_libraries' - '--web.console.templates=/usr/share/prometheus/consoles' expose: - 9090 volumes: - ./prometheus/:/etc/prometheus/ - prometheus-data:/prometheus profiles: - prometheus node-exporter: image: prom/node-exporter:${PROMETHEUS_NODE_EXPORTER_VERSION} restart: on-failure volumes: - /proc:/host/proc:ro - /sys:/host/sys:ro - /:/rootfs:ro command: - '--path.procfs=/host/proc' - '--path.sysfs=/host/sys' - --collector.filesystem.ignored-mount-points - "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)" expose: - 9100 profiles: - prometheus volumes: grafana-storage: tempo-local-storage: prometheus-data: