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 - role: samba
tags: tags:
- samba - samba
- role: power_management # - role: power_management
tags: # tags:
- power_management # - power_management
- role: backblaze - role: backblaze
tags: tags:
- backblaze - backblaze

View File

@ -245,25 +245,6 @@ netdata_config: "{{ docker_dir }}/netdata/"
netdata_lib: "{{ docker_data_dir }}/netdata/lib/" netdata_lib: "{{ docker_data_dir }}/netdata/lib/"
netdata_cache: "{{ docker_data_dir }}/netdata/cache" 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 # Plex
# #
@ -469,3 +450,17 @@ nginx:
paths: paths:
letsencrypt: "{{docker_dir}}/nginx/letsencrypt" letsencrypt: "{{docker_dir}}/nginx/letsencrypt"
data: "{{docker_dir}}/nginx/data" 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 # - include_tasks: zoneminder.yml
tags: # tags:
- zoneminder # - zoneminder
- include_tasks: pihole.yml - include_tasks: pihole.yml
tags: tags:
@ -12,9 +12,9 @@
tags: tags:
- syncthing - syncthing
- include_tasks: softserve.yml # - include_tasks: softserve.yml
tags: # tags:
- softserve # - softserve
- include_tasks: cupsd.yml - include_tasks: cupsd.yml
tags: tags:
@ -24,9 +24,9 @@
tags: tags:
- kuma - kuma
- include_tasks: traefik.yml # - include_tasks: traefik.yml
tags: # tags:
- traefik # - traefik
- include_tasks: plex.yml - include_tasks: plex.yml
tags: tags:
@ -82,3 +82,7 @@
- include_tasks: grafana.yml - include_tasks: grafana.yml
tags: tags:
- grafana - grafana
- include_tasks: jellyfin.yml
tags:
- jellyfin

View File

@ -6,4 +6,4 @@
group: "{{ pgid }}" group: "{{ pgid }}"
mode: '755' mode: '755'
state: directory 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: tags:
- swag - nginx

View File

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

View File

@ -1,36 +1,19 @@
version: '3' version: '3'
services: services:
swag: nginx:
image: lscr.io/linuxserver/swag:latest container_name: "{{nginx.host}}"
container_name: swag image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped restart: unless-stopped
networks: networks:
net: {} 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: ports:
- "{{ swag_port }}:443" - '{{nginx.endpoints.http}}:80'
- 80:80 #optional - '{{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: networks:
net: net:

View File

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