Add dispatcharr

This commit is contained in:
Mike Wilson
2025-12-21 21:01:12 -05:00
parent 37202f955f
commit e4d15fde79
2 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
- name: Create install directory
ansible.builtin.file:
path: "{{ install_directory }}/{{ role_name }}"
state: directory
owner: "{{ docker_user }}"
mode: "{{ docker_compose_directory_mask }}"
become: true
- name: Copy docker-compose file to destination
ansible.builtin.template:
src: docker-compose.yml
dest: "{{ install_directory }}/{{ role_name }}/docker-compose.yml"
owner: "{{ docker_user }}"
mode: "{{ docker_compose_file_mask }}"
validate: docker compose -f %s config
become: true
- name: Start docker container
community.docker.docker_compose_v2:
project_src: "{{ install_directory }}/{{ role_name }}"
pull: always
remove_orphans: yes

View File

@@ -0,0 +1,24 @@
networks:
traefik:
external: true
services:
dispatcharr:
container_name: "{{ role_name }}"
image: ghcr.io/dispatcharr/dispatcharr:latest
restart: unless-stopped
network_mode: "container:gluetun"
environment:
- DISPATCHARR_ENV=aio
- REDIS_HOST=localhost
- CELERY_BROKER_URL=redis://localhost:6379/0
- DISPATCHARR_LOG_LEVEL=info
volumes:
- "{{ data_dir }}/{{ role_name }}:/data"
devices:
- /dev/dri/renderD128:/dev/dri/renderD128
labels:
traefik.enable: true
traefik.http.routers.dispatcharr.rule: "Host(`dispatcharr.local.{{ personal_domain }}`)"
traefik.http.routers.dispatcharr.middlewares: lan-whitelist@file
traefik.http.services.dispatcharr.loadbalancer.server.port: 9191