From d2655e74fb2a2b1cc7b9ed3c0d93ede3a10b9120 Mon Sep 17 00:00:00 2001 From: Thibaut Selingue Date: Wed, 10 Jul 2024 10:59:51 +0200 Subject: [PATCH] feat(services): add facultative watchtower service --- README.md | 1 + watchtower.yml | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 watchtower.yml diff --git a/README.md b/README.md index 929587c..8f8e9c6 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ The repository currently supports these message brokers: - rabbitmq 3.8 +An optional watchtower service is available to update docker images automatically. Add `watchtower.yml` to `COMPOSE_FILE` variable and set a schedule with `WATCHTOWER_SCHEDULE` variable in your `.env` file (default is `0 0 17 * * *`). You should also [login to your docker hub account](https://docs.docker.com/security/for-developers/access-tokens/#create-an-access-token) to prevent rate limit issues. ## Troubleshooting diff --git a/watchtower.yml b/watchtower.yml new file mode 100644 index 0000000..8066fac --- /dev/null +++ b/watchtower.yml @@ -0,0 +1,9 @@ +services: + watchtower: + image: containrrr/watchtower + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /etc/localtime:/etc/localtime:ro + restart: always + environment: + WATCHTOWER_SCHEDULE: ${WATCHTOWER_SCHEDULE-0 0 17 * * *}