Add emby docker compose files
This commit is contained in:
parent
78d860bfcb
commit
cdc7209013
3 changed files with 56 additions and 0 deletions
22
ansible/roles/docker/files/emby/docker-compose.yml
Normal file
22
ansible/roles/docker/files/emby/docker-compose.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
version: "2.3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
emby:
|
||||||
|
image: linuxserver/emby:4.3.1.0-ls26
|
||||||
|
container_name: emby
|
||||||
|
environment:
|
||||||
|
- PUID=3000
|
||||||
|
- PGID=3000
|
||||||
|
- TZ=Europe/London
|
||||||
|
volumes:
|
||||||
|
- ./config:/config
|
||||||
|
- /mnt/media/TV:/mnt/TV
|
||||||
|
- /mnt/media/Movies:/mnt/Movies
|
||||||
|
ports:
|
||||||
|
- 8096:8096
|
||||||
|
restart: unless-stopped
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.emby.rule=Host(`media.jakehoward.tech`)"
|
||||||
|
- "traefik.http.routers.emby.tls=true"
|
||||||
|
- "traefik.http.routers.emby.tls.certresolver=le"
|
31
ansible/roles/docker/tasks/emby.yml
Normal file
31
ansible/roles/docker/tasks/emby.yml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
- name: Create emby directory
|
||||||
|
file:
|
||||||
|
path: '/opt/emby'
|
||||||
|
state: directory
|
||||||
|
owner: "{{ docker_user.name }}"
|
||||||
|
mode: "{{ docker_compose_directory_mask }}"
|
||||||
|
become: true
|
||||||
|
become_user: root
|
||||||
|
|
||||||
|
- name: Install emby compose file
|
||||||
|
template:
|
||||||
|
src: files/emby/docker-compose.yml
|
||||||
|
dest: "/opt/emby/docker-compose.yml"
|
||||||
|
mode: "{{ docker_compose_file_mask }}"
|
||||||
|
owner: "{{ docker_user.name }}"
|
||||||
|
validate: /usr/bin/docker-compose -f %s config
|
||||||
|
register: compose_file
|
||||||
|
become: true
|
||||||
|
become_user: root
|
||||||
|
|
||||||
|
- name: Cycle emby container
|
||||||
|
docker_compose:
|
||||||
|
project_src: /opt/emby
|
||||||
|
pull: true
|
||||||
|
remove_orphans: true
|
||||||
|
remove_volumes: true
|
||||||
|
state: "{{ item }}"
|
||||||
|
when: compose_file.changed
|
||||||
|
loop:
|
||||||
|
- absent
|
||||||
|
- present
|
|
@ -18,3 +18,6 @@
|
||||||
|
|
||||||
- name: Install whoami
|
- name: Install whoami
|
||||||
include: whoami.yml
|
include: whoami.yml
|
||||||
|
|
||||||
|
- name: Install emby
|
||||||
|
include: emby.yml
|
||||||
|
|
Loading…
Reference in a new issue