How to perform automatic update of multiple nodes on the same machine?

Hi, I have 2 docker nodes on the same machine, the containers of the nodes are named storagenode1 and storagenode2.
To make the two nodes update automatically can I use the watchover script as described in the documentation or do I need to apply changes ?

docker run -d --restart=always --name watchtower -v /var/run/docker.sock:/var/run/docker.sock storjlabs/watchtower storagenode watchtower --stop-timeout 300s

I have 5 nodes on the same machine. They all update automatically. Never changed anything in config or somewhere else.

2 Likes

You may also use docker compose:

Replace all placeholders <something> to yours actual values. For the second node add a new section for the second storagenode service with a different service and container names, and add this container name to the watchtower’s command line arguments.

Thank you @Alexey using docker-compose is more powerful.
Why my two nodes are on different versions?
The older node is still on version 1.76.2 while the newer one is on 1.78.2

We update nodes in waves to do not shutdown the network at the same time.
So, it will be updated when its time to come (depends on NodeID).