ansible/roles/docker/templates/compose-files/diun.yml

43 lines
1.0 KiB
YAML

# vim: ft=yaml.ansible
---
- name: Create diun volume folder
file:
path: "{{ services.diun.volume_folder }}"
state: directory
- name: Add diun notif config
template:
src: diun-notif-config.yml.j2
dest: "{{ services.diun.volume_folder }}/notif-config.yml"
owner: root
group: root
mode: 0600
- name: Setup diun
docker_compose:
project_name: diun
pull: yes
definition:
version: "3.5"
services:
diun:
container_name: diun
image: "crazymax/diun:{{ services.diun.version }}"
command: serve
volumes:
- "./data:/data"
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
- "TZ=Europe/Paris"
- "LOG_LEVEL=info"
- "LOG_JSON=false"
- "DIUN_WATCH_WORKERS=20"
- "DIUN_WATCH_SCHEDULE=0 */6 * * *"
- "DIUN_WATCH_JITTER=30s"
- "DIUN_PROVIDERS_DOCKER=true"
labels:
- "diun.enable=true"
restart: always