From 0c9440feb851ad2668606fb7fa00476e1013cbeb Mon Sep 17 00:00:00 2001 From: groales Date: Sun, 30 Nov 2025 12:27:44 +0100 Subject: [PATCH] Notificaciones SMTP: variables en compose, ejemplo en .env y README --- .env.example | 18 +++++++++++++++--- README.md | 12 ++++++++++++ docker-compose.yaml | 4 ++++ 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index db16204..9ae89be 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,18 @@ TZ=Europe/Madrid WATCHTOWER_CLEANUP=true WATCHTOWER_INCLUDE_STOPPED=false -WATCHTOWER_SCHEDULE=0 0 3 * * * -# WATCHTOWER_NOTIFICATIONS=shoutrrr -# WATCHTOWER_NOTIFICATION_URL=telegram://TOKEN@CHATID +WATCHTOWER_SCHEDULE=0 30 3 * * * + +# Notificaciones (Shoutrrr) +# Activar notificaciones vía Shoutrrr (SMTP, Telegram, Slack, etc.) +WATCHTOWER_NOTIFICATIONS=shoutrrr + +# SMTP (ejemplo) +# Formato general Shoutrrr SMTP: +# smtp://USUARIO:PASS@SMTP_HOST:587/?from=watchtower@midominio.com&to=ops@midominio.com&subject=Watchtower%20Actualizaciones&starttls=Yes +# Nota: Escapa caracteres especiales en usuario/password si es necesario. +WATCHTOWER_NOTIFICATION_URL=smtp://USUARIO:PASS@smtp.example.com:587/?from=watchtower@midominio.com&to=ops@midominio.com&subject=Watchtower%20Actualizaciones&starttls=Yes + +# Opcional: nivel y reporte final +WATCHTOWER_NOTIFIER_LEVEL=info +WATCHTOWER_NOTIFICATIONS_REPORT=true diff --git a/README.md b/README.md index 5a381cc..32bcd28 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,18 @@ environment: - Mantén backups si actualizas servicios con datos persistentes - Excluye servicios que gestionas manualmente (`enable=false`) +## Notificaciones SMTP (Shoutrrr) +Activa notificaciones con Shoutrrr y usa una URL SMTP en `.env`: +```env +WATCHTOWER_NOTIFICATIONS=shoutrrr +WATCHTOWER_NOTIFICATION_URL=smtp://USUARIO:PASS@smtp.example.com:587/?from=watchtower@midominio.com&to=ops@midominio.com&subject=Watchtower%20Actualizaciones&starttls=Yes +WATCHTOWER_NOTIFIER_LEVEL=info +WATCHTOWER_NOTIFICATIONS_REPORT=true +``` +Consejos: +- Escapa caracteres especiales en usuario/contraseña. +- Verifica puerto TLS/STARTTLS de tu servidor (587 suele ser STARTTLS). + ## Troubleshooting ```bash docker logs watchtower --tail=200 diff --git a/docker-compose.yaml b/docker-compose.yaml index 67f0b72..eb3efd0 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,6 +5,10 @@ services: 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: