File: docker-compose.metrics.yml

package info (click to toggle)
certstream-server-go 1.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 252 kB
  • sloc: makefile: 13
file content (69 lines) | stat: -rw-r--r-- 2,304 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: '2'

# Make sure to create the sub directories "prometheus", "prometheus_data", "grafana", "grafana_data" and "certstream"
# and create the config files for all three services. For further details please refer to https://github.com/d-Rickyy-b/certstream-server-go/wiki/Collecting-and-Visualizing-Metrics

networks:
  monitoring:
    driver: bridge
    ipam:
      config:
        - subnet: 172.90.0.0/24
          gateway: 172.90.0.1

services:
  prometheus:
    image: prom/prometheus:v2.40.5
    restart: always
    # Configure the service to run as specific user.
    # user: "1000:1000"
    volumes:
      - ./prometheus/:/etc/prometheus/
      - ./prometheus_data:/prometheus/
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
      - '--storage.tsdb.path=/prometheus'
      - '--storage.tsdb.retention.time=1y'
      - '--web.console.libraries=/etc/prometheus/console_libraries'
      - '--web.console.templates=/etc/prometheus/consoles'
      - '--web.enable-lifecycle'
    ports:
      # Exposing Prometheus is NOT required, if you don't want to access it from outside the Docker network.
      # Using localhost enables you to use a reverse proxy (e.g. with basic auth) to access Prometheus in a more secure way.
      - 127.0.0.1:9090:9090
    networks:
      - monitoring
    extra_hosts:
      - "host.docker.internal:host-gateway"

  grafana:
    image: grafana/grafana:9.3.1
    restart: always
    # Configure the service to run as specific user.
    # user: "1000:1000"
    depends_on:
      - prometheus
    ports:
      - 127.0.0.1:8082:3000
    volumes:
      - ./grafana_data:/var/lib/grafana
      - ./grafana/provisioning/:/etc/grafana/provisioning/
    env_file:
      # changes to the grafana env file require a rebuild of the container.
      - ./grafana/config.monitoring
    networks:
      - monitoring

  certstream:
    image: 0rickyy0/certstream-server-go:latest
    restart: always
    # Configure the service to run as specific user.
    # user: "1000:1000"
    ports:
      - 127.0.0.1:8080:80
      # Don't forget to open the other port in case you run the Prometheus endpoint on another port than the websocket server.
      # - 127.0.0.1:8081:81
    volumes:
      - ./certstream/config.yml:/app/config.yml
    networks:
      - monitoring