From 7775380d10c90d21974f7c689ab8d0837c17b016 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 1 May 2020 14:47:26 +0200 Subject: [PATCH] services: add SABnzbd --- .gitignore | 1 + docker-compose.yml | 15 +++++++ .../nginx/proxy-confs/sabnzbd.subdomain.conf | 45 +++++++++++++++++++ sabnzbd/NOTE | 1 + 4 files changed, 62 insertions(+) create mode 100644 letsencrypt/nginx/proxy-confs/sabnzbd.subdomain.conf create mode 100644 sabnzbd/NOTE diff --git a/.gitignore b/.gitignore index c08d9af..6f22e5b 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ /emby embystat /airsonic +sabnzbd /letsencrypt/* !/letsencrypt/nginx/ diff --git a/docker-compose.yml b/docker-compose.yml index b720001..c0c05d6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -115,6 +115,21 @@ services: - 51413:51413 - 51413:51413/udp + sabnzbd: + image: linuxserver/sabnzbd + container_name: sabnzbd + restart: unless-stopped + environment: + - PUID=1000 + - PGID=1000 + - TZ=Europe/Paris + volumes: + - ./sabnzbd:/config + - ~/downloads:/downloads + ports: + - 8081:8080 + - 9090:9090 + jackett: image: linuxserver/jackett container_name: jackett diff --git a/letsencrypt/nginx/proxy-confs/sabnzbd.subdomain.conf b/letsencrypt/nginx/proxy-confs/sabnzbd.subdomain.conf new file mode 100644 index 0000000..f6f6d9f --- /dev/null +++ b/letsencrypt/nginx/proxy-confs/sabnzbd.subdomain.conf @@ -0,0 +1,45 @@ +# make sure that your dns has a cname set for sabnzbd +# edit the sabnzbd.ini host_whitelist to avoid hostname verification issues. This format: +# host_whitelist = sabnzbd.domain.com, www.sabnzbd.domain.com + +server { + listen 443 ssl; + listen [::]:443 ssl; + + server_name sabnzbd.*; + + include /config/nginx/ssl.conf; + + client_max_body_size 0; + + # enable for ldap auth, fill in ldap details in ldap.conf + #include /config/nginx/ldap.conf; + + location / { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable the next two lines for ldap auth + #auth_request /auth; + #error_page 401 =200 /login; + + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_app sabnzbd; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } + + location ~ (/sabnzbd)?/api { + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_app sabnzbd; + set $upstream_port 8080; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } +} diff --git a/sabnzbd/NOTE b/sabnzbd/NOTE new file mode 100644 index 0000000..eb6e2ee --- /dev/null +++ b/sabnzbd/NOTE @@ -0,0 +1 @@ +add domains to allowed_host