From 3adaa9a024f9c0bdd3d3dde73427c0c407c343cf Mon Sep 17 00:00:00 2001 From: junya koyama Date: Sun, 20 Nov 2022 16:00:11 +0900 Subject: [PATCH] migrate from volumes to configs - /prometheus/prometheus.yml - /grafana/datasource.yml Signed-off-by: junya koyama --- prometheus-grafana/compose.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/prometheus-grafana/compose.yaml b/prometheus-grafana/compose.yaml index 24369bc..0717332 100644 --- a/prometheus-grafana/compose.yaml +++ b/prometheus-grafana/compose.yaml @@ -7,8 +7,10 @@ services: ports: - 9090:9090 restart: unless-stopped + configs: + - source: prometheus + target: /etc/prometheus/prometheus.yml volumes: - - ./prometheus:/etc/prometheus - prom_data:/prometheus grafana: image: grafana/grafana @@ -19,7 +21,13 @@ services: environment: - GF_SECURITY_ADMIN_USER=admin - GF_SECURITY_ADMIN_PASSWORD=grafana - volumes: - - ./grafana:/etc/grafana/provisioning/datasources + configs: + - source: grafana + target: /etc/grafana/provisioning/datasources/datasource.yml +configs: + prometheus: + file: ./prometheus/prometheus.yml + grafana: + file: ./grafana/datasource.yml volumes: prom_data: