Skip to content

Commit a2cab6c

Browse files
committed
fix: 운영계 배포시 프로메테우스랑 그라파나 재시작X
1 parent 5ea4587 commit a2cab6c

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

.github/workflows/prod-deploy.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,12 @@ jobs:
185185
key: ${{ secrets.PROD_SSH_PRIVATE_KEY }}
186186
script: |
187187
cd ~/play-hive/monitoring/monitoring
188-
echo "Stopping & Removing Existing Prometheus/Grafana containers..."
189-
sudo docker-compose -f docker-compose.monitoring.yml down -v --remove-orphans
190-
191-
echo "Removing old images (optional fallback)..."
192-
sudo docker image rm -f grafana/grafana || true
193-
sudo docker image rm -f prom/prometheus || true
194-
188+
195189
echo "Pulling latest images..."
196190
sudo docker-compose -f docker-compose.monitoring.yml pull
197191
198-
echo "Launching Prometheus & Grafana containers..."
192+
echo "Applying changes (recreate only if needed)..."
199193
sudo docker-compose -f docker-compose.monitoring.yml up -d
194+
195+
echo "Prometheus & Grafana deployment complete (without downtime)."
200196

monitoring/docker-compose.monitoring.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ services:
77
restart: always
88
volumes:
99
- ./prometheus.yml:/etc/prometheus/prometheus.yml
10+
- prometheus_data:/prometheus
1011
networks:
1112
- playhive-net
1213
ports:
@@ -28,4 +29,5 @@ networks:
2829
external: true
2930

3031
volumes:
31-
grafana_data:
32+
grafana_data:
33+
prometheus_data:

0 commit comments

Comments
 (0)