1
+ networks :
2
+ prometheus :
3
+ name : prometheus
4
+ driver : bridge
1
5
services :
2
6
go-application :
3
7
build :
@@ -6,27 +10,35 @@ services:
6
10
image : go-application
7
11
ports :
8
12
- " 80:5000"
13
+ networks :
14
+ - prometheus
9
15
python-application :
10
16
build :
11
17
context : ./python-application
12
18
container_name : python-application
13
19
image : python-application
14
20
ports :
15
21
- " 81:5000"
22
+ networks :
23
+ - prometheus
16
24
dotnet-application :
17
25
build :
18
26
context : ./dotnet-application
19
27
container_name : dotnet-application
20
28
image : dotnet-application
21
29
ports :
22
30
- " 82:5000"
31
+ networks :
32
+ - prometheus
23
33
nodejs-application :
24
34
build :
25
35
context : ./nodejs-application
26
36
container_name : nodejs-application
27
37
image : nodejs-application
28
38
ports :
29
39
- " 83:5000"
40
+ networks :
41
+ - prometheus
30
42
prometheus :
31
43
container_name : prometheus-svc
32
44
image : prom/prometheus:v3.3.0
@@ -35,6 +47,8 @@ services:
35
47
command : --config.file=/etc/prometheus/prometheus.yaml
36
48
volumes :
37
49
- ./prometheus.yaml:/etc/prometheus/prometheus.yaml
50
+ networks :
51
+ - prometheus
38
52
grafana :
39
53
image : grafana/grafana:11.6.1
40
54
ports :
@@ -43,6 +57,8 @@ services:
43
57
- GF_AUTH_BASIC_ENABLED=false
44
58
- GF_AUTH_ANONYMOUS_ENABLED=true
45
59
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
60
+ networks :
61
+ - prometheus
46
62
grafana-dashboards :
47
63
image : alpine:latest
48
64
depends_on :
@@ -56,4 +72,6 @@ services:
56
72
sleep 5s
57
73
cd /grafana
58
74
curl --request POST http://grafana:3000/api/datasources --header 'Content-Type: application/json' -d @datasources.json
59
- curl --request POST http://grafana:3000/api/dashboards/db --header 'Content-Type: application/json' -d @dashboard.json"
75
+ curl --request POST http://grafana:3000/api/dashboards/db --header 'Content-Type: application/json' -d @dashboard.json"
76
+ networks :
77
+ - prometheus
0 commit comments