From 5478712c0ca7683503bc1b50cfafe81ea508065e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 15 Jan 2021 15:32:36 +0100 Subject: [PATCH] Testing (#51) * Update NGINX conf for proxy bufferring (#50) * Fix linter warning --- README.md | 2 +- conf/nginx.conf | 18 ++++++++++++++++++ manifest.json | 2 +- scripts/install | 4 ++-- scripts/restore | 2 +- scripts/upgrade | 2 +- 6 files changed, 24 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a2b9467..f002652 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Jellyfin for YunoHost [![Integration level](https://dash.yunohost.org/integration/jellyfin.svg)](https://dash.yunohost.org/appci/app/jellyfin) ![](https://ci-apps.yunohost.org/ci/badges/jellyfin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jellyfin.maintain.svg) -[![Install Jellyfin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=jellyfin) +[![Install Jellyfin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=jellyfin) > *This package allows you to install Jellyfin quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* diff --git a/conf/nginx.conf b/conf/nginx.conf index b1f2ab0..0e7dfc1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,6 +6,7 @@ location __PATH__/ { rewrite ^ https://$server_name$request_uri? permanent; } + # Proxy main Jellyfin traffic proxy_pass http://127.0.0.1:__PORT____PATH__/; proxy_pass_request_headers on; proxy_set_header Host $host; @@ -16,6 +17,23 @@ location __PATH__/ { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; + # Disable buffering when the nginx proxy gets very resource heavy upon streaming + proxy_buffering off; + # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } + +location __PATH__/socket { + # Proxy Jellyfin Websockets traffic + proxy_pass http://127.0.0.1:__PORT____PATH__/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Protocol $scheme; + proxy_set_header X-Forwarded-Host $http_host; +} diff --git a/manifest.json b/manifest.json index 43eff57..53a5b7f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Media System that manage and stream your media.", "fr": "Système multimédia qui gère et diffuse vos médias." }, - "version": "10.6.4~ynh2", + "version": "10.6.4~ynh3", "url": "https://github.com/jellyfin/jellyfin", "license": "GPL-2.0-only", "maintainer": { diff --git a/scripts/install b/scripts/install index 7ce6717..95c39f8 100644 --- a/scripts/install +++ b/scripts/install @@ -57,7 +57,7 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Configuring firewall..." --weight=1 +ynh_script_progression --message="Finding an available port..." --weight=1 # Find an available port port=$(ynh_find_port --port=8095) @@ -125,7 +125,7 @@ ynh_use_logrotate #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description "Jellyfin media center" --log "/var/log/$app/$app.log" +yunohost service add $app --description="Jellyfin media center" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/restore b/scripts/restore index 12eb480..0339296 100644 --- a/scripts/restore +++ b/scripts/restore @@ -100,7 +100,7 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description "Jellyfin media center" --log "/var/log/$app/$app.log" +yunohost service add $app --description="Jellyfin media center" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 01d1fc4..2664d0e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -96,7 +96,7 @@ ynh_use_logrotate --non-append #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description "Jellyfin media center" --log "/var/log/$app/$app.log" +yunohost service add $app --description="Jellyfin media center" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE