docker-compose.yml
· 1.3 KiB · YAML
Raw
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
1 | services: |
2 | watchtower: |
3 | image: containrrr/watchtower:latest |
4 | container_name: watchtower |
5 | hostname: watchtower |
6 | networks: |
7 | - npm-internal |
8 | mem_limit: 128m |
9 | mem_reservation: 50m |
10 | cpu_shares: 256 |
11 | security_opt: |
12 | - no-new-privileges=true |
13 | read_only: true |
14 | volumes: |
15 | - /var/run/docker.sock:/var/run/docker.sock:ro |
16 | environment: |
17 | TZ: Europe/Rome |
18 | WATCHTOWER_CLEANUP: true # Remove old images after updating |
19 | WATCHTOWER_REMOVE_VOLUMES: false # Remove attached volumes after updating |
20 | DOCKER_API_VERSION: 1.47 # SSH docker version |
21 | WATCHTOWER_INCLUDE_RESTARTING: true # Restart containers after update |
22 | WATCHTOWER_INCLUDE_STOPPED: false # Update stopped containers |
23 | WATCHTOWER_SCHEDULE: "0 0 */4 * * *" # Update & Scan containers every 2 hours |
24 | WATCHTOWER_LABEL_ENABLE: false |
25 | WATCHTOWER_ROLLING_RESTART: true |
26 | WATCHTOWER_TIMEOUT: 30s |
27 | WATCHTOWER_HTTP_API_METRICS: false # Metrics for Prometheus |
28 | # WATCHTOWER_HTTP_API_TOKEN: mariushostingisthebest |
29 | # Token for Prometheus #If you installed premtheus & Grafana using Marius guide |
30 | WATCHTOWER_LOG_FORMAT: pretty |
31 | WATCHTOWER_NOTIFICATION_URL: ntfy://:tk_yubspe1qujk8lq4hsvs6h9uhwh4lr@ntfy.emanuelegori.uno/watchtower |
32 | restart: unless-stopped |
33 | |
34 | networks: |
35 | npm-internal: |
36 | name: npm-internal |
37 | external: true |