add watchtower to docker compose

This commit is contained in:
Help-14 2022-05-17 14:50:24 +07:00 committed by GitHub
parent db7caefb96
commit c240c4d8b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 9 deletions

View file

@ -6,4 +6,11 @@ services:
volumes:
- ./data/:/app/data
ports:
- '7001:7001'
- '7001:7001'
watchtower:
image: containrrr/watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/.docker/config.json:/config.json
command: --interval 30

View file

@ -29,6 +29,13 @@ services:
- ./data/:/app/data
ports:
- '7001:7001'
watchtower:
image: containrrr/watchtower
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/.docker/config.json:/config.json
command: --interval 30
```
Start the container:
@ -41,11 +48,4 @@ Go to your dashboard `http://localhost:7001` to check if everything go smoothly.
## Update Magma automatically
To get our regular update, you should install watchtower too.
```
docker run --detach \
--name watchtower \
--volume /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower
```
To get our regular update, you should install watchtower too. We added it to docker compose, but if you already had or don't want to then remove it.