giuto commited on
Commit
2f249da
·
1 Parent(s): 1708201

Add Grafana and Pushgateway services to docker-compose

Browse files
Files changed (1) hide show
  1. docker-compose.yml +49 -0
docker-compose.yml CHANGED
@@ -72,6 +72,51 @@ services:
72
  - hopcroft-net
73
  restart: unless-stopped
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  networks:
76
  hopcroft-net:
77
  driver: bridge
@@ -79,3 +124,7 @@ networks:
79
  volumes:
80
  hopcroft-logs:
81
  driver: local
 
 
 
 
 
72
  - hopcroft-net
73
  restart: unless-stopped
74
 
75
+ grafana:
76
+ image: grafana/grafana:latest
77
+ container_name: grafana
78
+ ports:
79
+ - "3000:3000"
80
+ environment:
81
+ - GF_SECURITY_ADMIN_USER=admin
82
+ - GF_SECURITY_ADMIN_PASSWORD=admin
83
+ - GF_USERS_ALLOW_SIGN_UP=false
84
+ - GF_SERVER_ROOT_URL=http://localhost:3000
85
+ - GF_INSTALL_PLUGINS=grafana-piechart-panel
86
+ volumes:
87
+ # Provisioning: auto-configure datasources and dashboards
88
+ - ./monitoring/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
89
+ - ./monitoring/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
90
+ - ./monitoring/grafana/dashboards:/var/lib/grafana/dashboards
91
+ # Persistent storage for Grafana data
92
+ - grafana-data:/var/lib/grafana
93
+ networks:
94
+ - hopcroft-net
95
+ depends_on:
96
+ - prometheus
97
+ restart: unless-stopped
98
+ healthcheck:
99
+ test: ["CMD-SHELL", "curl -f http://localhost:3000/api/health || exit 1"]
100
+ interval: 30s
101
+ timeout: 10s
102
+ retries: 3
103
+
104
+ pushgateway:
105
+ image: prom/pushgateway:latest
106
+ container_name: pushgateway
107
+ ports:
108
+ - "9091:9091"
109
+ networks:
110
+ - hopcroft-net
111
+ restart: unless-stopped
112
+ command:
113
+ - '--web.listen-address=:9091'
114
+ - '--persistence.file=/data/pushgateway.data'
115
+ - '--persistence.interval=5m'
116
+ volumes:
117
+ - pushgateway-data:/data
118
+
119
+
120
  networks:
121
  hopcroft-net:
122
  driver: bridge
 
124
  volumes:
125
  hopcroft-logs:
126
  driver: local
127
+ grafana-data:
128
+ driver: local
129
+ pushgateway-data:
130
+ driver: local