Add jellyseerr
by default
This commit is contained in:
parent
01cbd8644b
commit
796ee6dc84
3 changed files with 47 additions and 3 deletions
|
@ -8,6 +8,15 @@ services:
|
|||
- ./data/config/jellyfin:/config
|
||||
- cache:/cache
|
||||
- ./data/media:/media
|
||||
jellyseerr:
|
||||
image: fallenbagel/jellyseerr
|
||||
restart: unless-stopped
|
||||
user: 1337:1337
|
||||
environment:
|
||||
LOG_LEVEL: debug
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ./data/config/jellyseerr:/app/config
|
||||
radarr:
|
||||
image: linuxserver/radarr
|
||||
restart: unless-stopped
|
||||
|
|
|
@ -3,6 +3,9 @@ services:
|
|||
environment: {}
|
||||
ports:
|
||||
- 127.0.0.1:1337:8096
|
||||
jellyseerr:
|
||||
ports:
|
||||
- 127.0.0.1:1337:5055
|
||||
radarr:
|
||||
ports:
|
||||
- 127.0.0.1:1337:7878
|
||||
|
|
|
@ -4,6 +4,7 @@ begin
|
|||
set -l user jellyfin
|
||||
set -l domain media
|
||||
set -l server "$domain" ""
|
||||
set -l suggest "jellyseerr"
|
||||
set -l servarr radarr sonarr lidarr prowlarr
|
||||
set -l flood flood
|
||||
set -l service $user
|
||||
|
@ -77,10 +78,11 @@ begin
|
|||
printf "%s\0" $server
|
||||
end
|
||||
|
||||
function getServiceLocations -V servarr -V flood
|
||||
function getServiceLocations -V suggest -V servarr -V flood
|
||||
argparse -i "name=" -- $argv
|
||||
printf "%s\0" \
|
||||
"$_flag_name" / "" (
|
||||
"$_flag_name" / "" \
|
||||
"$suggest" "/suggest" "Jellyseerr" (
|
||||
for app in $servarr
|
||||
printf "%s\n" "$app" "/$app" ""
|
||||
printf "%s\n" "$app" "/$app/signalr" ""
|
||||
|
@ -112,7 +114,7 @@ begin
|
|||
end
|
||||
end
|
||||
|
||||
function getExtraLocationSettings -a domain s location -V service -V servarr
|
||||
function getExtraLocationSettings -a domain s location -V service -V suggest -V servarr
|
||||
set -l wsConfig (
|
||||
printf "%s\n" \
|
||||
'# Websocket' \
|
||||
|
@ -128,6 +130,36 @@ begin
|
|||
else if [ "$location" = /socket ]
|
||||
echo "$wsConfig"
|
||||
end
|
||||
else if [ "$s" = "$suggest" ]
|
||||
printf "%s\n" \
|
||||
"" \
|
||||
'set $app \'suggest\';' \
|
||||
"# Remove /suggest path to pass to the app" \
|
||||
'rewrite ^/suggest/?(.*)$ /$1 break;' \
|
||||
"" \
|
||||
"#Redirect location headers" \
|
||||
'proxy_redirect ^ /$app;' \
|
||||
'proxy_redirect /setup /$app/setup;' \
|
||||
'proxy_redirect /login /$app/login;' \
|
||||
"" \
|
||||
"# Sub filters to replace hardcoded paths" \
|
||||
'proxy_set_header Accept-Encoding "";' \
|
||||
'sub_filter_once off;' \
|
||||
'sub_filter_types *;' \
|
||||
'sub_filter \'</head>\' \'<script language="javascript">(()=>{var t="$app";let e=history.pushState;history.pushState=function a(){arguments[2]&&!arguments[2].startsWith("/"+t)&&(arguments[2]="/"+t+arguments[2]);let s=e.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),s};let a=history.replaceState;history.replaceState=function e(){arguments[2]&&!arguments[2].startsWith("/"+t)&&(arguments[2]="/"+t+arguments[2]);let s=a.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),s},window.addEventListener("popstate",()=>{console.log("popstate")})})();</script></head>\';' \
|
||||
'sub_filter \'href="/"\' \'href="/$app"\';' \
|
||||
'sub_filter \'href="/login"\' \'href="/$app/login"\'' \
|
||||
'sub_filter \'href:"/"\' \'href:"/$app"\';' \
|
||||
'sub_filter \'\/_next\' \'\/$app\/_next\';' \
|
||||
'sub_filter \'/_next\' \'/$app/_next\';' \
|
||||
'sub_filter \'/api/v1\' \'/$app/api/v1\';' \
|
||||
'sub_filter \'/login/plex/loading\' \'/$app/login/plex/loading\';' \
|
||||
'sub_filter \'/images/\' \'/$app/images/\';' \
|
||||
'sub_filter \'/android-\' \'/$app/android-\';' \
|
||||
'sub_filter \'/apple-\' \'/$app/apple-\';' \
|
||||
'sub_filter \'/favicon\' \'/$app/favicon\';' \
|
||||
'sub_filter \'/logo_\' \'/$app/logo_\';' \
|
||||
'sub_filter \'/site.webmanifest\' \'/$app/site.webmanifest\';'
|
||||
else if contains "$s" $servarr
|
||||
if string match --regex ".*/signalr^" "$location" >/dev/null
|
||||
echo "$wsConfig"
|
||||
|
|
Loading…
Reference in a new issue