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:
|
||||
image: containrrr/watchtower:latest
|
||||
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:
|
||||
- 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:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
command: --label-enable
|
||||
- /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
|
||||
|
||||
# Etiqueta tus servicios para que watchtower los actualice:
|
||||
# labels:
|
||||
# - "com.centurylinklabs.watchtower.enable=true"
|
||||
# Añade en cada servicio que quieras actualizar:
|
||||
# labels:
|
||||
# - "com.centurylinklabs.watchtower.enable=true"
|
||||
|
||||
Reference in New Issue
Block a user