Files
watchtower/docker-compose.yaml

23 lines
910 B
YAML

services:
watchtower:
image: containrrr/watchtower:latest
container_name: watchtower
restart: unless-stopped
environment:
- TZ=Europe/Madrid
- WATCHTOWER_NOTIFICATIONS=${WATCHTOWER_NOTIFICATIONS}
- WATCHTOWER_NOTIFICATION_URL=${WATCHTOWER_NOTIFICATION_URL}
- WATCHTOWER_NOTIFIER_LEVEL=${WATCHTOWER_NOTIFIER_LEVEL}
- WATCHTOWER_NOTIFICATIONS_REPORT=${WATCHTOWER_NOTIFICATIONS_REPORT}
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
command:
- --label-enable # Solo contenedores con label enable=true
- --cleanup # Elimina imágenes antiguas tras actualizar
- --schedule=0 30 3 * * * # Ejecuta cada día a las 03:30
- --stop-timeout=30s # Tiempo de gracia al parar contenedores
# Añade en cada servicio que quieras actualizar:
# labels:
# - "com.centurylinklabs.watchtower.enable=true"