From 41abf651b98f1434160b0c98683e643fe4f41ccc Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Sun, 27 Nov 2022 17:44:16 +0100 Subject: [PATCH] WIP jellyfin Signed-off-by: Bensuperpc --- Makefile | 6 +++-- docker-compose.yml | 49 ++++++++++++++++++++++++++++++++++++++ nginx-conf/firefox.conf | 30 +++++++++++++++++++++++ nginx-conf/jellyfin.conf | 48 +++++++++++++++++++++++++++++++++++++ nginx-conf/phpmyadmin.conf | 1 + 5 files changed, 132 insertions(+), 2 deletions(-) create mode 100644 nginx-conf/firefox.conf create mode 100644 nginx-conf/jellyfin.conf diff --git a/Makefile b/Makefile index 54371e6..10fe97a 100644 --- a/Makefile +++ b/Makefile @@ -20,14 +20,16 @@ DOCKER := docker -PROFILE := wp_db wordpress webserver certbot phpmyadmin flask_website flask_db pgadmin qbittorrent +DISABLED_PROFILE := firefox +PROFILE := wp_db wordpress webserver certbot phpmyadmin flask_website flask_db pgadmin qbittorrent jellyfin PROFILE_CMD := $(addprefix --profile ,$(PROFILE)) COMPOSE_FILE := docker-compose.yml AUTHOR := bensuperpc -IMAGE_NAME := wordpress:6.1.1-php8.1-fpm mariadb:10.10.2 nginx:1.23 certbot/certbot:v1.32.0 phpmyadmin:5.2.0 dpage/pgadmin4:6.16 lscr.io/linuxserver/qbittorrent:latest +IMAGE_NAME := wordpress:6.1.1-php8.1-fpm mariadb:10.10.2 nginx:1.23 certbot/certbot:v1.32.0 phpmyadmin:5.2.0 dpage/pgadmin4:6.16 lscr.io/linuxserver/qbittorrent:latest \ + lscr.io/linuxserver/jellyfin:latest firefox:latest lscr.io/linuxserver/firefox:latest #IMAGE_AUTHOR := $(addprefix itzg/, $(IMAGE_NAME)) diff --git a/docker-compose.yml b/docker-compose.yml index fd7beda..1e6acd7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -100,6 +100,47 @@ services: restart: unless-stopped networks: - app-network + jellyfin: + image: lscr.io/linuxserver/jellyfin:latest + container_name: jellyfin + profiles: + - jellyfin + environment: + - PUID=1000 + - PGID=1000 + - TZ=Europe/London + - JELLYFIN_PublishedServerUrl=192.168.0.5 #optional + volumes: + - jellyfin-config:/config + - jellyfin-tvseries:/data/tvshows + - jellyfin-movies:/data/movies + #ports: + # - 8096:8096 + # - 8920:8920 #optional + # - 7359:7359/udp #optional + # - 1900:1900/udp #optional + restart: unless-stopped + networks: + - app-network +# firefox: +# image: lscr.io/linuxserver/firefox:latest +# container_name: firefox +# profiles: +# - firefox +# security_opt: +# - seccomp:unconfined #optional +# environment: +# - PUID=1000 +# - PGID=1000 +# - TZ=Europe/London +# volumes: +# - firefox-config:/config + #ports: + # - 3000:3000 +# shm_size: "1gb" +# restart: unless-stopped +# networks: +# - app-network certbot: depends_on: - webserver @@ -153,6 +194,14 @@ volumes: qbittorrent-conf: name: qbittorrent-conf + jellyfin-config: + name: jellyfin-config + jellyfin-tvseries: + name: jellyfin-tvseries + jellyfin-movies: + name: jellyfin-movies + firefox-config: + name: firefox-config postgres-data: name: postgres-data diff --git a/nginx-conf/firefox.conf b/nginx-conf/firefox.conf new file mode 100644 index 0000000..075bcf8 --- /dev/null +++ b/nginx-conf/firefox.conf @@ -0,0 +1,30 @@ +#upstream firefox_server { + # ip_hash; +# server firefox:3000; + # server firefox:3000 weight=1 max_fails=3 fail_timeout=30s; +#} + +# firefox +#server { +# listen 80; +# listen [::]:80; + #listen 443; + #listen [::]:443; + +# server_name firefox.bensuperpc.org www.firefox.bensuperpc.org; + +# include /etc/nginx/conf.d/sub/gzip.conf; + +# location / { +# proxy_pass http://firefox_server; +# proxy_buffering off; +# proxy_http_version 1.1; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# proxy_set_header Upgrade $http_upgrade; +# proxy_set_header Connection $http_connection; +# # From: https://guacamole.apache.org/doc/0.9.7/gug/proxying-guacamole.html +# access_log off; +# } + + # resolver 8.8.8.8; +#} diff --git a/nginx-conf/jellyfin.conf b/nginx-conf/jellyfin.conf new file mode 100644 index 0000000..5cd5b8d --- /dev/null +++ b/nginx-conf/jellyfin.conf @@ -0,0 +1,48 @@ +#include /etc/nginx/conf.d/sub/cache-proxy.conf; + +upstream jellyfin_server { + # ip_hash; + server jellyfin:8096; + # server jellyfin:8096 weight=1 max_fails=3 fail_timeout=30s; +} + +# jellyfin +server { + listen 80; + listen [::]:80; + #listen 443; + #listen [::]:443; + + server_name jellyfin.bensuperpc.org www.jellyfin.bensuperpc.org; + + include /etc/nginx/conf.d/sub/gzip.conf; + + location / { + proxy_pass http://jellyfin_server; + proxy_redirect off; + proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header X-Forwarded-For $remote_addr; + + #proxy_set_header Host $host; + #proxy_set_header X-Real-IP $remote_addr; + #proxy_set_header X-Forwarded-Proto $scheme; + #proxy_set_header X-Forwarded-Host $host:$server_port; + #proxy_set_header X-Forwarded-Server $host; + #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + #proxy_set_header X-Forwarded-Ssl on; + + # Uncomment if you want to enable proxy cache + #proxy_cache PROXY; + #proxy_cache_valid 200 302 10m; + #proxy_cache_valid 301 1h; + #proxy_cache_valid any 1m; + #proxy_cache_lock on; + + #proxy_ignore_headers Vary; + #proxy_hide_header Vary; + + #add_header X-cache $upstream_cache_status; + } + + # resolver 8.8.8.8; +} diff --git a/nginx-conf/phpmyadmin.conf b/nginx-conf/phpmyadmin.conf index 1e981e0..57c5aba 100644 --- a/nginx-conf/phpmyadmin.conf +++ b/nginx-conf/phpmyadmin.conf @@ -29,6 +29,7 @@ server { #proxy_set_header X-Forwarded-Host $host:$server_port; #proxy_set_header X-Forwarded-Server $host; #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + #proxy_set_header X-Forwarded-Ssl on; # Uncomment if you want to enable proxy cache #proxy_cache PROXY;