docker-compose.yml 1.88 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
version: "3.7"

networks:
  metrics:
    name: metrics
  proxy:
    external: true

volumes:
  grafana:
    name: grafana
  victoria-metrics:
    name: victoria-metrics
  vmagent-buffer:
    name: vmagent-buffer

services:
  grafana:
19
    image: grafana/grafana:7.5.6
20
21
22
23
24
25
26
27
28
    container_name: grafana
    volumes:
      - grafana:/var/lib/grafana
      - ./ldap.toml:/etc/grafana-ldap/ldap.toml
    environment:
      - GF_DEFAULT_INSTANCE_NAME=picasoft
      - GF_SERVER_ROOT_URL=https://grafana.picasoft.net
      - GF_AUTH_LDAP_ENABLED=true
      - GF_AUTH_LDAP_CONFIG_FILE=/etc/grafana-ldap/ldap.toml
PICHOU Kyâne's avatar
PICHOU Kyâne committed
29
      - GF_AUTH_LDAP_ALLOW_SIGN_UP=true
30
31
32
33
34
35
36
37
38
39
40
41
    env_file: ./secrets/grafana.secrets
    labels:
      traefik.http.routers.grafana.entrypoints: websecure
      traefik.http.routers.grafana.rule: Host(`grafana.picasoft.net`)
      traefik.http.services.grafana.loadbalancer.server.port: 3000
      traefik.enable: true
    networks:
      - proxy
      - metrics
    restart: unless-stopped

  victoria-metrics:
42
    image: victoriametrics/victoria-metrics:v1.59.0
43
44
45
46
47
48
49
50
51
52
53
54
55
    container_name: victoria-metrics
    volumes:
      - victoria-metrics:/victoria-metrics-data
    command:
      - "-retentionPeriod=1200"
      - "-storageDataPath=/victoria-metrics-data"
      - "-selfScrapeInterval=10s"
      - "-selfScrapeInstance=vm-tsdb"
    networks:
      - metrics
    restart: unless-stopped

  vmagent:
56
    image: victoriametrics/vmagent:v1.59.0
57
58
59
60
61
62
63
64
65
    container_name: vmagent
    command:
      - "-promscrape.config=/config/vmagent-prom.yml"
      - "-promscrape.config.strictParse"
      - "-remoteWrite.url=http://victoria-metrics:8428/api/v1/write"
      - "-remoteWrite.tmpDataPath=/vmagent-remotewrite-data"
    volumes:
      - ./vmagent-prom.yml:/config/vmagent-prom.yml
      - vmagent-buffer:/vmagent-remotewrite-data
66
    env_file: ./secrets/exporters-auth.secrets
67
68
69
    networks:
      - metrics
    restart: unless-stopped