Add emby docker compose files

This commit is contained in:
Jake Howard 2020-01-30 13:35:10 +00:00
parent 78d860bfcb
commit cdc7209013
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 56 additions and 0 deletions

View 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"

View 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

View file

@ -18,3 +18,6 @@
- name: Install whoami
include: whoami.yml
- name: Install emby
include: emby.yml