| 1 | NTFY_TOKEN=<il_tuo_token> #necessario per NTFY |
| 2 |
docker-compose.yml
· 1.0 KiB · YAML
Bruto
services:
watchtower:
image: containrrr/watchtower:latest
container_name: watchtower
hostname: watchtower
mem_limit: 256m
mem_reservation: 128m
cpu_shares: 256
security_opt:
- no-new-privileges=true
read_only: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
TZ: Europe/Rome
WATCHTOWER_CLEANUP: true # Rimuove le vecchie immagini dopo l'aggiornamento
WATCHTOWER_REMOVE_VOLUMES: false # Mantieni i volumi
DOCKER_API_VERSION: 1.47
WATCHTOWER_INCLUDE_RESTARTING: true # Riavvia i contenitori dopo l'aggiornamento
WATCHTOWER_INCLUDE_STOPPED: false # Non aggiornare i contenitori fermati
WATCHTOWER_SCHEDULE: "0 3 * * * *" # Aggiorna ogni giorno alle 3 del mattino
WATCHTOWER_LABEL_ENABLE: false
WATCHTOWER_ROLLING_RESTART: true
WATCHTOWER_TIMEOUT: 30s
WATCHTOWER_LOG_FORMAT: pretty
#WATCHTOWER_NOTIFICATION_URL: ntfy://:${NTFY_TOKEN}@ntfy.emanuelegori.uno/watchtower #notifica via NTFY
restart: unless-stopped
| 1 | services: |
| 2 | watchtower: |
| 3 | image: containrrr/watchtower:latest |
| 4 | container_name: watchtower |
| 5 | hostname: watchtower |
| 6 | mem_limit: 256m |
| 7 | mem_reservation: 128m |
| 8 | cpu_shares: 256 |
| 9 | security_opt: |
| 10 | - no-new-privileges=true |
| 11 | read_only: true |
| 12 | volumes: |
| 13 | - /var/run/docker.sock:/var/run/docker.sock:ro |
| 14 | environment: |
| 15 | TZ: Europe/Rome |
| 16 | WATCHTOWER_CLEANUP: true # Rimuove le vecchie immagini dopo l'aggiornamento |
| 17 | WATCHTOWER_REMOVE_VOLUMES: false # Mantieni i volumi |
| 18 | DOCKER_API_VERSION: 1.47 |
| 19 | WATCHTOWER_INCLUDE_RESTARTING: true # Riavvia i contenitori dopo l'aggiornamento |
| 20 | WATCHTOWER_INCLUDE_STOPPED: false # Non aggiornare i contenitori fermati |
| 21 | WATCHTOWER_SCHEDULE: "0 3 * * * *" # Aggiorna ogni giorno alle 3 del mattino |
| 22 | WATCHTOWER_LABEL_ENABLE: false |
| 23 | WATCHTOWER_ROLLING_RESTART: true |
| 24 | WATCHTOWER_TIMEOUT: 30s |
| 25 | WATCHTOWER_LOG_FORMAT: pretty |
| 26 | #WATCHTOWER_NOTIFICATION_URL: ntfy://:${NTFY_TOKEN}@ntfy.emanuelegori.uno/watchtower #notifica via NTFY |
| 27 | restart: unless-stopped |
| 28 |