File size: 1,370 Bytes
2e3e9b8
 
 
 
 
 
f89e294
2e3e9b8
 
 
 
8103714
5e6809d
8103714
5e6809d
 
 
 
 
 
8103714
5e6809d
 
 
 
 
 
 
8103714
5e6809d
 
8103714
5e6809d
 
 
 
2e3e9b8
8103714
 
 
 
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
services:
  prometheus:
    image: prom/prometheus:v2.55.0
    container_name: nl2sql-prom
    command:
      - --config.file=/etc/prometheus/prometheus.yml
      - --web.enable-lifecycle
    volumes:
      - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
      - ./prometheus/rules.yml:/etc/prometheus/rules.yml:ro
    ports:
      - "9090:9090"                  # Prometheus UI
    networks:
      - observability               # attach to custom network
    restart: unless-stopped

  grafana:
    image: grafana/grafana:latest
    container_name: nl2sql-grafana
    ports:
      - "3000:3000"
    depends_on:
      - prometheus
    environment:
      - GF_SECURITY_ADMIN_USER=admin
      - GF_SECURITY_ADMIN_PASSWORD=admin
      - GF_USERS_ALLOW_SIGN_UP=false
      - GF_AUTH_ANONYMOUS_ENABLED=false
      # Optional: set home dashboard to our JSON inside the mounted folder
      - GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards/nl2sql.json
    volumes:
      # Provisioning folders (read-only)
      - ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources:ro
      - ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro
    networks:
      - observability
    restart: unless-stopped

networks:
  observability:
    driver: bridge                   # define the custom network