migrate from volumes to configs

- /prometheus/prometheus.yml
- /grafana/datasource.yml

Signed-off-by: junya koyama <arukiidou@yahoo.co.jp>
This commit is contained in:
junya koyama 2022-11-20 16:00:11 +09:00
parent e3ea3e9044
commit 3adaa9a024

View File

@ -7,8 +7,10 @@ services:
ports: ports:
- 9090:9090 - 9090:9090
restart: unless-stopped restart: unless-stopped
configs:
- source: prometheus
target: /etc/prometheus/prometheus.yml
volumes: volumes:
- ./prometheus:/etc/prometheus
- prom_data:/prometheus - prom_data:/prometheus
grafana: grafana:
image: grafana/grafana image: grafana/grafana
@ -19,7 +21,13 @@ services:
environment: environment:
- GF_SECURITY_ADMIN_USER=admin - GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=grafana - GF_SECURITY_ADMIN_PASSWORD=grafana
volumes: configs:
- ./grafana:/etc/grafana/provisioning/datasources - source: grafana
target: /etc/grafana/provisioning/datasources/datasource.yml
configs:
prometheus:
file: ./prometheus/prometheus.yml
grafana:
file: ./grafana/datasource.yml
volumes: volumes:
prom_data: prom_data: