36 lines
1.3 KiB
YAML
36 lines
1.3 KiB
YAML
services:
|
|
watchtower:
|
|
image: containrrr/watchtower
|
|
container_name: watchtower
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
environment:
|
|
WATCHTOWER_CLEANUP: "true"
|
|
WATCHTOWER_POLL_INTERVAL: 86400
|
|
WATCHTOWER_NOTIFICATION_REPORT: "true"
|
|
WATCHTOWER_NOTIFICATION_URL: >
|
|
generic+http://192.168.2.158:8123/api/webhook/-skoZVzhPaZcecNZaigi9Np1B?template=json
|
|
WATCHTOWER_NOTIFICATION_TEMPLATE: |
|
|
{"title":"Watchtower","message":"
|
|
{{- if .Report -}}
|
|
{{- with .Report -}}
|
|
{{len .Scanned}} Scanned, {{len .Updated}} Updated, {{len .Failed}} Failed
|
|
{{- range .Updated}}
|
|
- {{.Name}} ({{.ImageName}}): {{.CurrentImageID.ShortID}} updated to {{.LatestImageID.ShortID}}
|
|
{{- end -}}
|
|
{{- range .Fresh}}
|
|
- {{.Name}} ({{.ImageName}}): {{.State}}
|
|
{{- end -}}
|
|
{{- range .Skipped}}
|
|
- {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}}
|
|
{{- end -}}
|
|
{{- range .Failed}}
|
|
- {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- else -}}
|
|
{{range .Entries -}}{{.Message}}\n{{- end -}}
|
|
{{- end -}}"
|
|
}
|