watchtower-docker-compose
# docker-compose file to start up watchtower, docker container auto updating service
# to start the container run:
# docker-compose up -d
#
# Note2: docker container name is sourced from the .env file in this directory.
#
# Note3: containrrr/watchtower service will auto update this container
version: "2.4"
services:
watchtower:
image: containrrr/watchtower
container_name: watchtower.localhost
restart: always
mem_limit: 64M
environment:
- WATCHTOWER_NOTIFICATIONS=shoutrrr
- WATCHTOWER_NOTIFICATION_URL=googlechat://chat.googleapis.com/v1/spaces/AAAAAe6yhmg/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=vdA_pXecqbGj-6KVIWzotPJ3GXX6l7Lh086lGfYPjI0%3D
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime:ro
labels:
- com.centurylinklabs.watchtower.enable=true
# Update containers at 4:15am by default and delete old images after update
# To override the time, add SCHEDULE="0 15 6 * * *" in .env and docker-compose down/up
command: --label-enable --cleanup --schedule ${SCHEDULE:-"0 15 4 * * *"}