services: watchtower: image: containrrr/watchtower:latest container_name: automa-watchtower restart: unless-stopped environment: - WATCHTOWER_CLEANUP=true # Remove old images - WATCHTOWER_POLL_INTERVAL=86400 # Check every 24 hours - WATCHTOWER_LABEL_ENABLE=true # Only update labeled containers - WATCHTOWER_INCLUDE_STOPPED=false # Skip stopped containers - TZ=${TZ:-Asia/Shanghai} volumes: - /var/run/docker.sock:/var/run/docker.sock labels: - "com.automa.service=watchtower" - "com.centurylinklabs.watchtower.enable=false" # Don't update itself # Add this label to containers you want to auto-update: # labels: # - "com.centurylinklabs.watchtower.enable=true"