ansible/roles/stacks/composes/inventory/watchtower.yml

41 lines
1.8 KiB
YAML
Raw Normal View History

2023-09-26 16:09:27 +00:00
# 2023-09-26
2023-09-25 08:40:20 +00:00
# Stack: stacks
---
watchtower:
name: "watchtower"
ipv6: true
directories: []
services:
- name: "watchtower"
image: "registry.zogg.fr/zogg/watchtower:latest"
uid: "0"
gid: "0"
privileged: true
restart: "always"
ports:
- { exposed: "${VM_PORT_WATCHTOWER}", container: "8080" }
healthcheck: '/healthcheck || exit 1'
environment:
- { name: "#WATCHTOWER_POLL_INTERVAL", value: "900" }
- { name: "WATCHTOWER_SCHEDULE", value: "0 0 2 * * *" }
- { name: "WATCHTOWER_NO_STARTUP_MESSAGE", value: "true" }
- { name: "WATCHTOWER_LABEL_ENABLE", value: "true" }
- { name: "WATCHTOWER_CLEANUP", value: "true" }
- { name: "WATCHTOWER_INCLUDE_STOPPED", value: "true" }
- { name: "WATCHTOWER_HTTP_API_METRICS", value: "true" }
- { name: "WATCHTOWER_HTTP_API_TOKEN", value: "{{ vm_watchtower_apitoken }}" }
- { name: "WATCHTOWER_NOTIFICATIONS", value: "shoutrrr" }
- { name: "WATCHTOWER_NOTIFICATION_URL", value: "{{ vm_notification_webhook }}/watchtower" }
- { name: "WATCHTOWER_NOTIFICATION_TEMPLATE", value: !unsafe "{{range .}}{{.Message}}{{println}}{{end}}" }
- { name: "WATCHTOWER_NOTIFICATIONS_LEVEL", value: "info" }
- { name: "WATCHTOWER_WARN_ON_HEAD_FAILURE", value: "never" }
- { name: "WATCHTOWER_NOTIFICATION_TITLE_TAG", value: "${WATCHTOWER_NOTIFICATION_TITLE_TAG}" }
- { name: "WATCHTOWER_NOTIFICATIONS_HOSTNAME", value: "${WATCHTOWER_NOTIFICATIONS_HOSTNAME}" }
ressources:
2023-09-26 16:09:27 +00:00
cpu: "{{ vm_os_cpu_max }}"
memory: "{{ 1.0 if 1.0 <= vm_os_memory_max|float else vm_os_memory_max|float }}G"