53 lines
2.0 KiB
YAML
53 lines
2.0 KiB
YAML
services:
|
|
watchtower:
|
|
container_name: watchtower-app
|
|
hostname: watchtower-app
|
|
image: containrrr/watchtower
|
|
restart: unless-stopped
|
|
secrets:
|
|
- access_token
|
|
environment:
|
|
- DOCKER_HOST=tcp://socket-proxy:2375
|
|
- TZ=${TZ}
|
|
- WATCHTOWER_CLEANUP=true # Removes old images after update
|
|
- "WATCHTOWER_SCHEDULE=0 0 18 * * *" # Updates at 6 PM daily (Uses 6-field cron schedule, not the traditional 5-field)
|
|
- WATCHTOWER_LABEL_ENABLE=true # Updates only labeled containers
|
|
- WATCHTOWER_POLL_INTERVAL=86400
|
|
- WATCHTOWER_HTTP_API_METRICS=true
|
|
- WATCHTOWER_REMOVE_VOLUMES=true
|
|
- WATCHTOWER_LOG_LEVEL=info
|
|
- WATCHTOWER_HTTP_API_TOKEN=${WATCHTOWER_API_KEY}
|
|
# - WATCHTOWER_NOTIFICATIONS=email
|
|
# - WATCHTOWER_NOTIFICATION_EMAIL_FROM=${EMAIL_FROM}
|
|
# - WATCHTOWER_NOTIFICATION_EMAIL_TO=${EMAIL_TO}
|
|
# - WATCHTOWER_NOTIFICATION_EMAIL_SERVER=${EMAIL_SERVER}
|
|
# - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=${EMAIL_SERVER_PORT}
|
|
# - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=${EMAIL_SERVER_USER}
|
|
# - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=${EMAIL_SERVER_PASSWORD}
|
|
# - WATCHTOWER_NOTIFICATION_EMAIL_DELAY=2
|
|
- WATCHTOWER_NOTIFICATIONS=gotify
|
|
- WATCHTOWER_NOTIFICATION_GOTIFY_URL=${GOTIFY_URL
|
|
- WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN=${GOTIFY_TOKEN}
|
|
- WATCHTOWER_NO_STARTUP_MESSAGE=true
|
|
ports:
|
|
- 9080:8080
|
|
networks:
|
|
- homepage
|
|
- socket-proxy
|
|
- watchtower
|
|
depends_on:
|
|
- socket-proxy
|
|
labels:
|
|
- "com.centurylinklabs.watchtower.enable=true"
|
|
- "homepage.group=Maintenance"
|
|
- "homepage.name=Watchtower"
|
|
- "homepage.icon=watchtower.png"
|
|
- "homepage.description=Automatic container updates"
|
|
- "homepage.widget.type=watchtower"
|
|
- "homepage.widget.url=http://watchtower:8080"
|
|
- "homepage.widget.key=${WATCHTOWER_API_KEY}"
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- /root/.docker/config.json:/config.json |