Skip to content

Commit 742153e

Browse files
authored
Merge pull request #773 from Impact123/restart-policy
Unify docker restart policy among docs and example files
2 parents 5f7e4a3 + a182c69 commit 742153e

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ If you're using Docker, getting started is as simple as running the following co
7272
> See [docker/example.omnibus.docker-compose.yml](https://github.com/AnalogJ/scrutiny/blob/master/docker/example.omnibus.docker-compose.yml) for a docker-compose file.
7373
7474
```bash
75-
docker run -it --rm -p 8080:8080 -p 8086:8086 \
75+
docker run -p 8080:8080 -p 8086:8086 --restart unless-stopped \
7676
-v `pwd`/scrutiny:/opt/scrutiny/config \
7777
-v `pwd`/influxdb2:/opt/scrutiny/influxdb \
7878
-v /run/udev:/run/udev:ro \
@@ -103,17 +103,17 @@ other Docker images:
103103
> See [docker/example.hubspoke.docker-compose.yml](https://github.com/AnalogJ/scrutiny/blob/master/docker/example.hubspoke.docker-compose.yml) for a docker-compose file.
104104
105105
```bash
106-
docker run --rm -p 8086:8086 \
106+
docker run -p 8086:8086 --restart unless-stopped \
107107
-v `pwd`/influxdb2:/var/lib/influxdb2 \
108108
--name scrutiny-influxdb \
109109
influxdb:2.2
110110

111-
docker run --rm -p 8080:8080 \
111+
docker run -p 8080:8080 --restart unless-stopped \
112112
-v `pwd`/scrutiny:/opt/scrutiny/config \
113113
--name scrutiny-web \
114114
ghcr.io/analogj/scrutiny:master-web
115115

116-
docker run --rm \
116+
docker run --restart unless-stopped \
117117
-v /run/udev:/run/udev:ro \
118118
--cap-add SYS_RAWIO \
119119
--device=/dev/sda \

docker/example.hubspoke.docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: '2.4'
22

33
services:
44
influxdb:
5+
restart: unless-stopped
56
image: influxdb:2.2
67
ports:
78
- '8086:8086'
@@ -15,6 +16,7 @@ services:
1516

1617

1718
web:
19+
restart: unless-stopped
1820
image: 'ghcr.io/analogj/scrutiny:master-web'
1921
ports:
2022
- '8080:8080'
@@ -33,6 +35,7 @@ services:
3335
start_period: 10s
3436

3537
collector:
38+
restart: unless-stopped
3639
image: 'ghcr.io/analogj/scrutiny:master-collector'
3740
cap_add:
3841
- SYS_RAWIO

docker/example.omnibus.docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: '3.5'
22

33
services:
44
scrutiny:
5+
restart: unless-stopped
56
container_name: scrutiny
67
image: ghcr.io/analogj/scrutiny:master-omnibus
78
cap_add:

docs/INSTALL_HUB_SPOKE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ networks:
5959

6060
services:
6161
influxdb:
62+
restart: unless-stopped
6263
container_name: influxdb
6364
image: influxdb:2.1-alpine
6465
ports:
@@ -73,11 +74,11 @@ services:
7374
- DOCKER_INFLUXDB_INIT_ORG=homelab
7475
- DOCKER_INFLUXDB_INIT_BUCKET=scrutiny
7576
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=your-very-secret-token
76-
restart: unless-stopped
7777
networks:
7878
- monitoring
7979

8080
scrutiny:
81+
restart: unless-stopped
8182
container_name: scrutiny
8283
image: ghcr.io/analogj/scrutiny:master-web
8384
ports:
@@ -94,7 +95,6 @@ services:
9495
- SCRUTINY_NOTIFY_URLS=["http://gotify:80/message?token=a-gotify-token"]
9596
depends_on:
9697
- influxdb
97-
restart: unless-stopped
9898
networks:
9999
- notifications
100100
- monitoring
@@ -168,6 +168,7 @@ version: "3.4"
168168
services:
169169
170170
collector:
171+
restart: unless-stopped
171172
image: 'ghcr.io/analogj/scrutiny:master-collector'
172173
cap_add:
173174
- SYS_RAWIO

0 commit comments

Comments
 (0)