infrastructure/ansible/plays/services/loki/docker-compose.yaml

28 lines
834 B
YAML

version: "3.4"
services:
loki:
image: grafana/loki:latest
restart: unless-stopped
command: -config.file=/etc/loki/loki.yaml
volumes:
- ./loki.yml:/etc/loki/loki.yaml:ro,Z
- loki_data:/loki
labels:
- "traefik.enable=true"
- "traefik.http.routers.loki.rule=Host(`loki.tobiasmanske.de`)"
- "traefik.http.middlewares.loki-auth.basicauth.users={{ common.loki.username }}:{{ common.loki.password_hash | mandatory }}"
- "traefik.http.routers.loki.entryPoints=websecure"
- "traefik.http.services.loki.loadbalancer.server.port=3100"
- "traefik.http.routers.loki.middlewares=loki-auth"
- "prometheus-scrape.enabled=true"
- "prometheus-scrape.port=3100"
networks:
- metrics
- default
volumes:
loki_data:
networks:
metrics:
external: true