Skip to content

Commit 7374dc6

Browse files
Refactor Docker run command to always restart Prometheus container
1 parent b526879 commit 7374dc6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/scripts/prometheus.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ run_output=$(docker run -d \
5555
--name "$CONTAINER_NAME" \
5656
--network "$NETWORK_NAME" \
5757
-p "$PROMETHEUS_PORT:$PROMETHEUS_PORT" \
58-
--restart unless-stopped \
58+
--restart always \
5959
-v "$PROMETHEUS_CONFIG_FILE:/etc/prometheus/prometheus.yml" \
6060
"$PROMETHEUS_IMAGE" 2>&1) # Capture both stdout and stderr
6161

src/scripts/update_prometheus.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ else
2828
--name "$CONTAINER_NAME" \
2929
--network "$NETWORK_NAME" \
3030
-p "$PROMETHEUS_PORT:$PROMETHEUS_PORT" \
31-
--restart unless-stopped \
31+
--restart always \
3232
-v "$PROMETHEUS_CONFIG:/etc/prometheus/prometheus.yml" \
3333
"$PROMETHEUS_IMAGE" &> /dev/null
3434

0 commit comments

Comments
 (0)