services: add Jellyfin

This commit is contained in:
Bruno BELANYI 2020-03-15 15:41:13 +01:00
parent 0a61fde0ff
commit b6c61cafdb
3 changed files with 58 additions and 0 deletions

View file

@ -281,6 +281,19 @@ services:
- 8080
user: 1000:1000
jellyfin:
image: linuxserver/jellyfin
container_name: jellyfin
restart: unless-stopped
env_file:
- ./jellyfin/jellyfin.env
volumes:
- ./jellyfin:/config
- ~/videos/shows:/data/tvshows
- ~/videos/movies:/data/movies
expose:
- 8096
photoprism:
image: photoprism/photoprism:latest
container_name: photoprism

4
jellyfin/jellyfin.env Normal file
View file

@ -0,0 +1,4 @@
PUID=1000
PGID=1000
TZ=Europe/Paris
UMASK_SET=022

View file

@ -0,0 +1,41 @@
# make sure that your dns has a cname set for jellyfin
# if jellyfin is running in bridge mode and the container is named "jellyfin", the below config should work as is
# if not, replace the line "set $upstream_app jellyfin;" with "set $upstream_app <containername>;"
# or "set $upstream_app <HOSTIP>;" for host mode, HOSTIP being the IP address of jellyfin
# in jellyfin settings, under "Advanced/Networking" change the public https port to 443, leave the local ports as is,
# and set the "Secure connection mode" to "Handled by reverse proxy"
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name jellyfin.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app jellyfin;
set $upstream_port 8096;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
}
location ~ (/jellyfin)?/socket {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app jellyfin;
set $upstream_port 8096;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
}
}