diff --git a/ansible/roles/monitoring/files/docker-compose.panel.yml b/ansible/roles/monitoring/files/docker-compose.panel.yml index 8bafed7..3e28e3e 100644 --- a/ansible/roles/monitoring/files/docker-compose.panel.yml +++ b/ansible/roles/monitoring/files/docker-compose.panel.yml @@ -34,8 +34,8 @@ services: container_name: prometheus restart: unless-stopped volumes: + - prometheus_data:/prometheus - ./prometheus.yml:/etc/prometheus/prometheus.yml - - ./prometheus_data:/prometheus command: - "--config.file=/etc/prometheus/prometheus.yml" ports: @@ -53,6 +53,7 @@ services: - GF_SECURITY_ADMIN_USER=admin - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD} volumes: + - grafana_data:/var/lib/grafana - ./datasource.yaml:/etc/grafana/provisioning/datasources/datasource.yaml - ./dashboard.yaml:/etc/grafana/provisioning/dashboards/main.yaml - ./dashboards:/var/lib/grafana/dashboards @@ -63,6 +64,12 @@ services: networks: - monitoring_net + +volumes: + prometheus_data: {} + grafana_data: {} + + networks: monitoring_net: driver: bridge