| 1 | NTFY_TOKEN=<il_tuo_token> |
| 2 |
emanuelegori / Watchtower
Last active 4 months ago
Watchtower è un tool che permette di aggiornare automaticamente i container Docker in esecuzione. Monitora le immagini su Docker Hub o altri registri e, se rileva una nuova versione, riavvia il container con l'immagine aggiornata.
Revision f92ca65672710615e7cb56e169662638fbc9817e
| 1 | services: |
| 2 | watchtower: |
| 3 | image: containrrr/watchtower:latest |
| 4 | container_name: watchtower |
| 5 | hostname: watchtower |
| 6 | mem_limit: 128m |
| 7 | mem_reservation: 50m |
| 8 | cpus: "0.5" |
| 9 | security_opt: |
| 10 | - no-new-privileges=true |
| 11 | read_only: true |
| 12 | tmpfs: |
| 13 | - /tmp |
| 14 | volumes: |
| 15 | - /var/run/docker.sock:/var/run/docker.sock:ro |
| 16 | environment: |
| 17 | TZ: Europe/Rome |
| 18 | WATCHTOWER_CLEANUP: true # Rimuove le vecchie immagini dopo l'aggiornamento |
| 19 | WATCHTOWER_REMOVE_VOLUMES: false # Mantieni i volumi |
| 20 | WATCHTOWER_INCLUDE_RESTARTING: true # Riavvia i contenitori dopo l'aggiornamento |
| 21 | WATCHTOWER_INCLUDE_STOPPED: false # Non aggiornare i contenitori fermati |
| 22 | WATCHTOWER_SCHEDULE: "0 0 3 * * *" # Aggiorna ogni giorno alle 3 del mattino |
| 23 | WATCHTOWER_LABEL_ENABLE: false |
| 24 | WATCHTOWER_ROLLING_RESTART: true |
| 25 | WATCHTOWER_TIMEOUT: 30s |
| 26 | WATCHTOWER_HTTP_API_METRICS: false |
| 27 | WATCHTOWER_NOTIFICATION_URL: ntfy://:${NTFY_TOKEN}@ntfy.emanuelegori.uno/watchtower ## ntfy://:TOKEN@ntfy.emanuelegori.uno/watchtower |
| 28 | restart: unless-stopped |
| 29 |