Move Teamarr to a dedicated compose directory/file

This commit is contained in:
Mike Wilson
2025-12-23 12:54:29 -05:00
parent 8ce0aecb4e
commit 9146d65be3
3 changed files with 42 additions and 14 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,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