From 92ca044d06350ad354a27d147d78886999228c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Thu, 28 Mar 2024 14:02:24 +0000 Subject: [PATCH] Adding diun (#208) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #174 Reviewed-on: https://git.data.coop/data.coop/ansible/pulls/208 Co-authored-by: Víðir Valberg Guðmundsson Co-committed-by: Víðir Valberg Guðmundsson --- roles/docker/defaults/main.yml | 4 ++++ .../templates/compose-files/diun.yml.j2 | 21 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 roles/docker/templates/compose-files/diun.yml.j2 diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index f84a4dc2..f838c090 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -211,6 +211,10 @@ services: volume_folder: "{{ volume_root_folder }}/watchtower" version: "1.5.3" + diun: + version: "4.27" + volume_folder: "{{ volume_root_folder }}/diun" + ### Uptime monitoring ### uptime_kuma: domain: "uptime.{{ base_domain }}" diff --git a/roles/docker/templates/compose-files/diun.yml.j2 b/roles/docker/templates/compose-files/diun.yml.j2 new file mode 100644 index 00000000..b4285b87 --- /dev/null +++ b/roles/docker/templates/compose-files/diun.yml.j2 @@ -0,0 +1,21 @@ +# vim: ft=yaml.ansible +--- +version: "3.5" + +services: + diun: + image: "ghcr.io/crazy-max/diun:{{ services.diun.version }}" + command: serve + volumes: + - "./data:/data" + - "/var/run/docker.sock:/var/run/docker.sock" + environment: + - "TZ=Europe/Paris" + - "DIUN_WATCH_WORKERS=20" + - "DIUN_WATCH_SCHEDULE=0 */6 * * *" + - "DIUN_WATCH_JITTER=30s" + - "DIUN_PROVIDERS_DOCKER=true" + - "DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=true" + labels: + - "diun.enable=true" + restart: always \ No newline at end of file