Added Jellyfin

Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
pull/1/head
TuDatTr 2023-10-06 15:52:45 +02:00
parent a9af3c74c8
commit 67d88c6576
10 changed files with 97 additions and 96 deletions

View File

@ -9,9 +9,9 @@
- role: samba
tags:
- samba
- role: power_management
tags:
- power_management
# - role: power_management
# tags:
# - power_management
- role: backblaze
tags:
- backblaze

View File

@ -245,25 +245,6 @@ netdata_config: "{{ docker_dir }}/netdata/"
netdata_lib: "{{ docker_data_dir }}/netdata/lib/"
netdata_cache: "{{ docker_data_dir }}/netdata/cache"
#
# swag
#
swag_port: "443"
swag_host: "swag"
swag_config: "{{ docker_dir }}/{{ swag_host }}/config/"
swag_subdomains: "{{ remote_subdomains }}"
swag_email: "me+swag@tudattr.dev"
swag_site_confs:
- "templates/mii/swag/site-confs/plex.subdomain.conf"
- "templates/mii/swag/site-confs/uptime-kuma.subdomain.conf"
- "templates/mii/swag/site-confs/tautulli.subdomain.conf"
# - "templates/mii/swag/site-confs/code-server.subdomain.conf"
# - "templates/mii/swag/site-confs/homeassistant.subdomain.conf"
# - "templates/mii/swag/site-confs/qbittorrent.subdomain.conf"
# - "templates/mii/swag/site-confs/zoneminder.subdomain.conf"
swag_remote_site_confs: "{{swag_config}}/nginx/site-confs/"
#
# Plex
#
@ -469,3 +450,17 @@ nginx:
paths:
letsencrypt: "{{docker_dir}}/nginx/letsencrypt"
data: "{{docker_dir}}/nginx/data"
#
# Jellyfin
#
jellyfin:
host: "jellyfin"
port: "8096"
config: "{{docker_data_dir}}/jellyfin/config"
cache: "{{docker_data_dir}}/jellyfin/cache"
media:
tv: "{{ plex_tv }}"
movies: "{{ plex_movies }}"
music: "{{ plex_music }}"

View File

@ -1,8 +1,8 @@
---
- include_tasks: zoneminder.yml
tags:
- zoneminder
# - include_tasks: zoneminder.yml
# tags:
# - zoneminder
- include_tasks: pihole.yml
tags:
@ -12,9 +12,9 @@
tags:
- syncthing
- include_tasks: softserve.yml
tags:
- softserve
# - include_tasks: softserve.yml
# tags:
# - softserve
- include_tasks: cupsd.yml
tags:
@ -24,9 +24,9 @@
tags:
- kuma
- include_tasks: traefik.yml
tags:
- traefik
# - include_tasks: traefik.yml
# tags:
# - traefik
- include_tasks: plex.yml
tags:
@ -82,3 +82,7 @@
- include_tasks: grafana.yml
tags:
- grafana
- include_tasks: jellyfin.yml
tags:
- jellyfin

View File

@ -6,4 +6,4 @@
group: "{{ pgid }}"
mode: '755'
state: directory
become: true
become: yes

View File

@ -0,0 +1,31 @@
---
- name: Create jellyfin-config directory
file:
path: "{{ jellyfin.config }}"
owner: "{{ puid }}"
group: "{{ pgid }}"
mode: '755'
state: directory
become: yes
- name: Create jellyfin-cache directory
file:
path: "{{ jellyfin.cache }}"
owner: "{{ puid }}"
group: "{{ pgid }}"
mode: '755'
state: directory
become: yes
- name: Create jellyfin media directories
file:
path: "{{ item }}"
owner: "{{ puid }}"
group: "{{ pgid }}"
mode: '755'
state: directory
become: yes
loop:
- "{{ jellyfin.media.tv }}"
- "{{ jellyfin.media.movies }}"
- "{{ jellyfin.media.music }}"

View File

@ -1,4 +1,5 @@
---
- include_tasks: swag.yml
- include_tasks: nginx-proxy-manager.yml
tags:
- swag
- nginx

View File

@ -26,8 +26,6 @@ services:
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp"
- "{{ pihole_port }}:80/tcp"
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "{{ pihole_config }}:/etc/pihole/"
@ -56,7 +54,6 @@ services:
networks:
- net
ports:
- "{{ syncthing_port }}:8384" # Web UI
- 22000:22000/tcp # TCP file transfers
- 22000:22000/udp # QUIC file transfers
- 21027:21027/udp # Receive local discovery broadcasts
@ -80,8 +77,6 @@ services:
- PUID={{puid}}
- PGID={{pgid}}
- TZ={{timezone}}
ports:
- "{{cupsd_port}}:631"
volumes:
- /var/run/dbus:/var/run/dbus
- "{{cupsd_config}}:/etc/cups"
@ -98,8 +93,6 @@ services:
- PUID={{puid}}
- PGID={{pgid}}
- TZ={{timezone}}
ports:
- "{{ kuma_port }}:3001"
volumes:
- "{{ kuma_config }}:/app/data"
@ -129,9 +122,9 @@ services:
- VERSION=docker
volumes:
- "{{ plex_config }}:/config"
- "{{ plex_tv }}:/tv"
- "{{ plex_movies }}:/movies"
- "{{ plex_music }}:/music"
- "{{ plex_tv }}:/tv:ro"
- "{{ plex_movies }}:/movies:ro"
- "{{ plex_music }}:/music:ro"
sonarr:
image: lscr.io/linuxserver/sonarr:latest
@ -149,8 +142,6 @@ services:
- {{ sonarr_config }}:/config
- {{ sonarr_media }}:/tv #optional
- {{ sonarr_downloads }}:/downloads #optional
ports:
- {{ sonarr_port }}:8989
radarr:
image: lscr.io/linuxserver/radarr:latest
@ -168,8 +159,6 @@ services:
- {{ radarr_config }}:/config
- {{ radarr_media }}:/movies #optional
- {{ radarr_downloads }}:/downloads #optional
ports:
- {{ radarr_port }}:7878
lidarr:
image: lscr.io/linuxserver/lidarr:latest
@ -187,8 +176,6 @@ services:
- {{ lidarr_config }}:/config
- {{ lidarr_media }}:/music #optional
- {{ lidarr_downloads }}:/downloads #optional
ports:
- {{ lidarr_port }}:8686
prowlarr:
image: lscr.io/linuxserver/prowlarr:latest
@ -204,8 +191,6 @@ services:
- TZ={{ timezone }}
volumes:
- {{ prowlarr_config }}:/config
ports:
- {{ prowlarr_port }}:9696
pastebin:
image: wantguns/bin
@ -215,8 +200,6 @@ services:
- pihole
networks:
- net
ports:
- "{{ bin_port }}:{{ bin_port }}"
environment:
- PUID={{ puid }}
- PGID={{ pgid }}
@ -240,8 +223,6 @@ services:
- TZ={{ timezone }}
volumes:
- {{ tautulli_config}}:/config
ports:
- {{ tautulli_port }}:8181
{{ gluetun_host }}:
image: qmcgaw/gluetun
@ -253,9 +234,6 @@ services:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
ports:
- {{ torrentleech_port }}:{{ torrentleech_port }}
- {{ qbit_port }}:{{ qbit_port }}
volumes:
- {{ gluetun_config }}:/gluetun
environment:
@ -324,8 +302,6 @@ services:
volumes:
- {{ prometheus_config }}:/etc/prometheus/
- prometheus_data:/prometheus/
ports:
- {{ prometheus_port }}:9090
{{ grafana_host }}:
image: grafana/grafana-oss
@ -343,8 +319,6 @@ services:
volumes:
- {{ grafana_data }}:/var/lib/grafana/
- {{ grafana_config }}:/etc/grafana/
ports:
- {{ grafana_port }}:3000
ddns-updater:
container_name: ddns-updater
@ -356,8 +330,6 @@ services:
net: {}
volumes:
- "{{ ddns_data }}:/updater/data/"
ports:
- "{{ ddns_port }}:8000/tcp"
homeassistant:
container_name: homeassistant
@ -385,8 +357,25 @@ services:
- pihole
networks:
net: {}
{{ jellyfin.host }}:
container_name: {{ jellyfin.host }}
image: jellyfin/jellyfin
restart: 'unless-stopped'
depends_on:
- pihole
networks:
net: {}
devices:
- /dev/dri:/dev/dri
volumes:
- {{ jellyfin.config }}:/config
- {{ jellyfin.cache }}:/cache
- {{ jellyfin.media.tv }}:/tv:ro
- {{ jellyfin.media.movies }}:/movies:ro
- {{ jellyfin.media.music }}:/music:ro
ports:
- '{{stirling.port}}:8080'
- "{{ jellyfin.port }}:{{ jellyfin.port }}"
networks:
zoneminder:
@ -402,4 +391,4 @@ networks:
config:
- subnet: {{ docker_network }}
volumes:
prometheus_data: {}
prometheus_data: {}

View File

@ -1,36 +1,19 @@
version: '3'
services:
swag:
image: lscr.io/linuxserver/swag:latest
container_name: swag
nginx:
container_name: "{{nginx.host}}"
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
networks:
net: {}
dns:
- {{ aya01_ip }}
- {{ pi_ip }}
- 1.1.1.1
cap_add:
- NET_ADMIN
environment:
- PUID={{ puid }}
- PGID={{ pgid }}
- TZ={{ timezone }}
- URL={{ remote_domain }}
- VALIDATION=http
- SUBDOMAINS={{ swag_subdomains }} #optional
- CERTPROVIDER= #optional
- DNSPLUGIN=cloudflare #optional
- PROPAGATION= #optional
- EMAIL={{ swag_email }} #optional
- ONLY_SUBDOMAINS=false #optional
- EXTRA_DOMAINS= # qbit.seyshiro.de,zm.seyshiro.de,hass.seyshiro.de
- STAGING=false #optional
volumes:
- "{{ swag_config }}:/config"
ports:
- "{{ swag_port }}:443"
- 80:80 #optional
- '{{nginx.endpoints.http}}:80'
- '{{nginx.endpoints.https}}:443'
- '{{nginx.endpoints.admin}}:81'
volumes:
- "{{nginx.paths.data}}:/data"
- "{{nginx.paths.letsencrypt}}:/etc/letsencrypt"
- '/var/run/docker.sock:/var/run/docker.sock'
networks:
net:

View File

@ -27,8 +27,6 @@ services:
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp"
- "{{ pihole_port }}:80/tcp"
environment:
- "WEBPASSWORD={{ vault.pi.pihole.password }}"
- "ServerIP=192.168.20.11"