Compose: usar restart unless-stopped, flags en command, schedule 03:30, cleanup y socket ro
This commit is contained in:
@@ -2,19 +2,24 @@ services:
|
|||||||
watchtower:
|
watchtower:
|
||||||
image: containrrr/watchtower:latest
|
image: containrrr/watchtower:latest
|
||||||
container_name: watchtower
|
container_name: watchtower
|
||||||
restart: always
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/Madrid
|
||||||
|
services:
|
||||||
|
watchtower:
|
||||||
|
image: containrrr/watchtower:latest
|
||||||
|
container_name: watchtower
|
||||||
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Madrid
|
- TZ=Europe/Madrid
|
||||||
- WATCHTOWER_CLEANUP=true
|
|
||||||
- WATCHTOWER_INCLUDE_STOPPED=false
|
|
||||||
- WATCHTOWER_SCHEDULE=0 0 3 * * *
|
|
||||||
# Notificaciones (ejemplos):
|
|
||||||
# - WATCHTOWER_NOTIFICATIONS=shoutrrr
|
|
||||||
# - WATCHTOWER_NOTIFICATION_URL=telegram://token@chatid
|
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
command: --label-enable
|
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
|
||||||
|
|
||||||
# Etiqueta tus servicios para que watchtower los actualice:
|
# Añade en cada servicio que quieras actualizar:
|
||||||
# labels:
|
# labels:
|
||||||
# - "com.centurylinklabs.watchtower.enable=true"
|
# - "com.centurylinklabs.watchtower.enable=true"
|
||||||
|
|||||||
Reference in New Issue
Block a user