services: watchtower: image: containrrr/watchtower:latest container_name: watchtower hostname: watchtower networks: - npm-internal mem_limit: 128m mem_reservation: 50m 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 # Remove old images after updating WATCHTOWER_REMOVE_VOLUMES: false # Remove attached volumes after updating DOCKER_API_VERSION: 1.47 # SSH docker version WATCHTOWER_INCLUDE_RESTARTING: true # Restart containers after update WATCHTOWER_INCLUDE_STOPPED: false # Update stopped containers WATCHTOWER_SCHEDULE: "0 0 */4 * * *" # Update & Scan containers every 2 hours WATCHTOWER_LABEL_ENABLE: false WATCHTOWER_ROLLING_RESTART: true WATCHTOWER_TIMEOUT: 30s WATCHTOWER_HTTP_API_METRICS: false # Metrics for Prometheus # WATCHTOWER_HTTP_API_TOKEN: mariushostingisthebest # Token for Prometheus #If you installed premtheus & Grafana using Marius guide WATCHTOWER_LOG_FORMAT: pretty WATCHTOWER_NOTIFICATION_URL: ntfy://:tk_yubspe1qujk8lq4hsvs6h9uhwh4lr@ntfy.emanuelegori.uno/watchtower restart: unless-stopped networks: npm-internal: name: npm-internal external: true