mirror of
https://github.com/furyhawk/cloudy.git
synced 2026-07-21 02:05:53 +00:00
feat: add setup-prometheus target and update Prometheus service configuration
This commit is contained in:
@@ -238,7 +238,7 @@ deploy-grafana: pull setup-grafana
|
||||
set +a ;\
|
||||
docker stack deploy --compose-file ./swarm/grafana.yml grafana ;\
|
||||
}
|
||||
deploy-prometheus: pull
|
||||
deploy-prometheus: pull setup-prometheus
|
||||
{ \
|
||||
echo "Deploying the prometheus stack..." ;\
|
||||
set -a ;\
|
||||
@@ -246,6 +246,12 @@ deploy-prometheus: pull
|
||||
set +a ;\
|
||||
docker stack deploy --compose-file ./swarm/prometheus.yml prometheus ;\
|
||||
}
|
||||
setup-prometheus:
|
||||
{ \
|
||||
echo "Setting up prometheus config on host..." ;\
|
||||
mkdir -p /var/data/prometheus ;\
|
||||
cp -n ./swarm/prometheus/prometheus.yml /var/data/prometheus/prometheus.yml 2>/dev/null || echo "prometheus.yml already exists, skipping" ;\
|
||||
}
|
||||
deploy-nodepad: pull
|
||||
{ \
|
||||
echo "Building the nodepad image..." ;\
|
||||
|
||||
@@ -19,7 +19,6 @@ services:
|
||||
- /var/data/grafana/grafana.ini:/etc/grafana/grafana.ini:ro
|
||||
- /var/data/grafana/provisioning:/etc/grafana/provisioning:ro
|
||||
- /var/data/grafana/dashboards:/var/lib/grafana/dashboards:ro
|
||||
- ./grafana/provisioning/datasources/prometheus.yml:/etc/grafana/provisioning/datasources/prometheus.yml:ro
|
||||
networks:
|
||||
- traefik-public
|
||||
deploy:
|
||||
|
||||
@@ -18,7 +18,7 @@ services:
|
||||
volumes:
|
||||
- prometheus_data:/prometheus
|
||||
- /var/data/prometheus/rules:/etc/prometheus/rules:ro
|
||||
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- /var/data/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
networks:
|
||||
- traefik-public
|
||||
ports:
|
||||
|
||||
Reference in New Issue
Block a user