Add dispatcharr
This commit is contained in:
22
ansible/roles/dispatcharr/tasks/main.yml
Normal file
22
ansible/roles/dispatcharr/tasks/main.yml
Normal 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
|
||||||
24
ansible/roles/dispatcharr/templates/docker-compose.yml
Normal file
24
ansible/roles/dispatcharr/templates/docker-compose.yml
Normal 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
|
||||||
Reference in New Issue
Block a user