Move Teamarr to a dedicated compose directory/file
This commit is contained in:
@@ -22,17 +22,3 @@ services:
|
|||||||
traefik.http.routers.dispatcharr.rule: "Host(`dispatcharr.local.{{ personal_domain }}`)"
|
traefik.http.routers.dispatcharr.rule: "Host(`dispatcharr.local.{{ personal_domain }}`)"
|
||||||
traefik.http.routers.dispatcharr.middlewares: lan-whitelist@file
|
traefik.http.routers.dispatcharr.middlewares: lan-whitelist@file
|
||||||
traefik.http.services.dispatcharr.loadbalancer.server.port: 9191
|
traefik.http.services.dispatcharr.loadbalancer.server.port: 9191
|
||||||
|
|
||||||
teamarr:
|
|
||||||
container_name: teamarr
|
|
||||||
image: ghcr.io/egyptiangio/teamarr:latest
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
- "TZ={{ timezone }}"
|
|
||||||
volumes:
|
|
||||||
- "{{ data_dir }}/teamarr:/app/data"
|
|
||||||
labels:
|
|
||||||
traefik.enable: true
|
|
||||||
traefik.http.routers.teamarr.rule: "Host(`teamarr.local.{{ personal_domain }}`)"
|
|
||||||
traefik.http.routers.teamarr.middlewares: lan-whitelist@file
|
|
||||||
traefik.http.services.teamarr.loadbalancer.server.port: 9195
|
|
||||||
|
|||||||
22
ansible/roles/teamarr/tasks/main.yml
Normal file
22
ansible/roles/teamarr/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
|
||||||
20
ansible/roles/teamarr/templates/docker-compose.yml
Normal file
20
ansible/roles/teamarr/templates/docker-compose.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
networks:
|
||||||
|
traefik:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
teamarr:
|
||||||
|
container_name: teamarr
|
||||||
|
image: ghcr.io/egyptiangio/teamarr:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- traefik
|
||||||
|
environment:
|
||||||
|
- "TZ={{ timezone }}"
|
||||||
|
volumes:
|
||||||
|
- "{{ data_dir }}/teamarr:/app/data"
|
||||||
|
labels:
|
||||||
|
traefik.enable: true
|
||||||
|
traefik.http.routers.teamarr.rule: "Host(`teamarr.local.{{ personal_domain }}`)"
|
||||||
|
traefik.http.routers.teamarr.middlewares: lan-whitelist@file
|
||||||
|
traefik.http.services.teamarr.loadbalancer.server.port: 9195
|
||||||
Reference in New Issue
Block a user