docker-compose.yml
· 1.1 KiB · YAML
Raw
services:
watchtower:
image: containrrr/watchtower:latest
container_name: watchtower
hostname: watchtower
mem_limit: 128m
mem_reservation: 50m
cpus: "0.5"
security_opt:
- no-new-privileges=true
read_only: true
tmpfs:
- /tmp
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
WATCHTOWER_INCLUDE_RESTARTING: true # Riavvia i contenitori dopo l'aggiornamento
WATCHTOWER_INCLUDE_STOPPED: false # Non aggiornare i contenitori fermati
WATCHTOWER_SCHEDULE: "0 0 3 * * *" # Aggiorna ogni giorno alle 3 del mattino
WATCHTOWER_LABEL_ENABLE: false
WATCHTOWER_ROLLING_RESTART: true
WATCHTOWER_TIMEOUT: 30s
WATCHTOWER_HTTP_API_METRICS: false
WATCHTOWER_NOTIFICATION_URL: ntfy://:${NTFY_TOKEN}@ntfy.emanuelegori.uno/watchtower ## ntfy://:TOKEN@ntfy.emanuelegori.uno/watchtower
restart: unless-stopped
| 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 |