Skip to content

Commit 8638ebc

Browse files
committed
added grafana to yml file
1 parent 7a538bc commit 8638ebc

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

examples/docker/docker-compose.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222

2323
books:
2424
build: './books'
25-
#only changes the docker desktop name of the container
25+
#only changes the docker desktop name of the container
2626
container_name: 'books'
2727

2828
ports:
@@ -101,12 +101,24 @@ services:
101101
image: prom/prometheus:latest
102102
container_name: prometheus
103103
ports:
104-
- 9090:9090
104+
- 9090:9090
105105
command:
106-
- --config.file=/etc/prometheus/prometheus.yml
106+
- --config.file=/etc/prometheus/prometheus.yml
107107
volumes:
108-
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
108+
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
109109
depends_on:
110-
- cadvisor
111-
112-
110+
- cadvisor
111+
112+
grafana:
113+
image: grafana/grafana:latest
114+
container_name: grafana
115+
ports:
116+
- 2999:3000
117+
volumes:
118+
# Share the named volume with the grafana container
119+
- grafana-dir:/etc/grafana
120+
environment:
121+
GF_PATHS_CONFIG: /etc/grafana/grafana.ini
122+
GF_SECURITY_ALLOW_EMBEDDING: 'true'
123+
depends_on:
124+
- prometheus

0 commit comments

Comments
 (0)