demo-grafana-loki
/
docker-compose.yml
52 строки · 1.3 Кб
1version: "3.9"
2
3x-def-logging: &default-logging
4logging:
5driver: "loki"
6options:
7loki-url: "http://localhost:3100/loki/api/v1/push"
8loki-batch-size: "100"
9loki-retries: 2
10loki-max-backoff: 1000ms
11loki-timeout: 1s
12
13services:
14nginx:
15image: nginx
16hostname: nginx-entrypoint
17container_name: nginx-entrypoint
18restart: unless-stopped
19<<: *default-logging
20environment:
21TZ: "Europe/Moscow"
22ports:
23- 80:80
24healthcheck:
25test: [ "CMD", "curl", "-f", "http://localhost" ]
26interval: 10s
27timeout: 10s
28retries: 20
29
30loki:
31hostname: loki
32image: grafana/loki:2.9.0
33environment:
34TZ: ${SYSTEM_TIMEZONE:-Europe/Moscow}
35volumes:
36- ./loki/retention-config.yaml:/etc/loki/retention-config.yaml
37ports:
38- "3100:3100"
39command: -config.file=/etc/loki/retention-config.yaml
40
41grafana:
42hostname: grafana
43environment:
44- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
45- GF_AUTH_ANONYMOUS_ENABLED=true
46- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
47- TZ=${SYSTEM_TIMEZONE:-Europe/Moscow}
48volumes:
49- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
50image: grafana/grafana:latest
51ports:
52- "3000:3000"