From fc18c437ea27aeab492973d8734f26ea56554799 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Fri, 18 Mar 2022 02:52:27 +0300 Subject: [PATCH 1/4] emby. draft. --- README.md | 1 + emby/.env.dist | 16 ++++++++++++++++ emby/config/.gitignore | 2 ++ emby/docker-compose.yml | 24 ++++++++++++++++++++++++ emby/nginx/emby.conf | 25 +++++++++++++++++++++++++ 5 files changed, 68 insertions(+) create mode 100644 emby/.env.dist create mode 100644 emby/config/.gitignore create mode 100644 emby/docker-compose.yml create mode 100644 emby/nginx/emby.conf diff --git a/README.md b/README.md index c166c8f..5ec4e79 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Not every stack is tested to fully work. | ARK Server | ✅ | `thmhoag/arkserver` | ARK: Survival Evolved game server with ArkManager. | [Website](http://playark.com), [Steam](https://store.steampowered.com/app/346110/ARK_Survival_Evolved/), [Image Github](https://github.com/thmhoag/arkserver), [ArkManager](https://github.com/arkmanager/ark-server-tools) | | Duplicati | ✅ | `linuxserver/duplicati` | Backup solution with many storage backends. | [Website](https://www.duplicati.com), [Github](https://github.com/duplicati/duplicati) | | Element-web | ✅ | `vectorim/element-web` | Web Matrix client. | [Website](https://element.io), [Github](https://github.com/vector-im/element-web/) | +| emby | Not tested | `emby/embyserver` | Media server with online transcoding support. | [Website](https://emby.media) | | Folding@Home | ✅ | `johnktims/folding-at-home` | Protein folding distributed computing platform. | [Website](https://foldingathome.org), [My guide](https://skobk.in/2020/06/folding-at-home-quick-start/) | | Gatus | ✅ | `twinproduction/gatus` | Advanced service(s) status page. | [Website](https://gatus.io), [Github](https://github.com/TwiN/gatus) | | Gitea | ✅ | `gitea/gitea` | Lightweight Git hosting platfom. | [Website](https://gitea.io/), [Github](https://github.com/go-gitea/gitea) | diff --git a/emby/.env.dist b/emby/.env.dist new file mode 100644 index 0000000..2b9f671 --- /dev/null +++ b/emby/.env.dist @@ -0,0 +1,16 @@ +# see https://hub.docker.com/r/linuxserver/syncthing +HOST_USER=1000 +HOST_GROUP=1000 + +HOST_CONFIG_DIR=./config +# You should set this to proper directory with your libraries +HOST_MULTIMEDIA_DIR=/mnt/multimedia +# Leave as it is unless you really need something else +INT_MULTIMEDIA_DIR=/libraries + +WEBUI_BIND_ADDR=127.0.0.1 +WEBUI_BIND_PORT=8096 +#WEBUI_HTTPS_BIND_PORT=8920 + +LOG_MAX_SIZE=5m +LOG_MAX_FILE=5 \ No newline at end of file diff --git a/emby/config/.gitignore b/emby/config/.gitignore new file mode 100644 index 0000000..a68d087 --- /dev/null +++ b/emby/config/.gitignore @@ -0,0 +1,2 @@ +/* +!/.gitignore diff --git a/emby/docker-compose.yml b/emby/docker-compose.yml new file mode 100644 index 0000000..0e7d301 --- /dev/null +++ b/emby/docker-compose.yml @@ -0,0 +1,24 @@ +# https://hub.docker.com/r/emby/embyserver +version: '3.7' + +services: + emby: + image: emby/embyserver + container_name: emby + volumes: + - "${HOST_CONFIG_DIR:-./config}:/config" + - "${HOST_MULTIMEDIA_DIR}:${INT_MULTIMEDIA_DIR:-/libraries}" + ports: + - "${WEBUI_BIND_ADDR:-127.0.0.1}:${WEBUI_BIND_PORT:-8096}:8096/tcp" + # Use reverse-proxy instead + #- "${WEBUI_BIND_ADDR-127.0.0.1}:${WEBUI_HTTPS_BIND_PORT:-8920}:8920/tcp" + env_file: .env + environment: + UID: "${HOST_USER:-1000}" + GID: "${HOST_GROUP:-1000}" + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "${LOG_MAX_SIZE:-5m}" + max-file: "${LOG_MAX_FILE:-5}" diff --git a/emby/nginx/emby.conf b/emby/nginx/emby.conf new file mode 100644 index 0000000..71a0161 --- /dev/null +++ b/emby/nginx/emby.conf @@ -0,0 +1,25 @@ +server { + listen 80; + server_name emby.domain.tld; + + #charset utf-8; + + # https://emby.media/community/index.php?/topic/93074-how-to-emby-with-nginx-with-windows-specific-tips-and-csp-options/ + location / { + 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_hide_header X-Powered-By; ## Hides nginx server version from bad guys. + proxy_set_header Range $http_range; ## Allows specific chunks of a file to be requested. + proxy_set_header If-Range $http_if_range; ## Allows specific chunks of a file to be requested. + #proxy_set_header X-Real-IP $http_CF_Connecting_IP; ## if you use cloudflare un-comment this line and comment out above line. + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $http_connection; + + proxy_pass http://localhost:8096/; + } +} \ No newline at end of file -- 2.43.5 From 87893d4bb9b3554266953bdfc386be0857b13eb6 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Fri, 18 Mar 2022 02:57:20 +0300 Subject: [PATCH 2/4] emby. Adding env variable for docker image. --- emby/.env.dist | 3 +++ emby/docker-compose.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/emby/.env.dist b/emby/.env.dist index 2b9f671..16b197f 100644 --- a/emby/.env.dist +++ b/emby/.env.dist @@ -2,6 +2,9 @@ HOST_USER=1000 HOST_GROUP=1000 +#DOCKER_IMAGE=emby/embyserver:beta +DOCKER_IMAGE=emby/embyserver:latest + HOST_CONFIG_DIR=./config # You should set this to proper directory with your libraries HOST_MULTIMEDIA_DIR=/mnt/multimedia diff --git a/emby/docker-compose.yml b/emby/docker-compose.yml index 0e7d301..14de37a 100644 --- a/emby/docker-compose.yml +++ b/emby/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.7' services: emby: - image: emby/embyserver + image: "${DOCKER_IMAGE:-emby/embyserver}" container_name: emby volumes: - "${HOST_CONFIG_DIR:-./config}:/config" -- 2.43.5 From 181fbdf01d36525c6cafb622b21a06554389a65b Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Fri, 18 Mar 2022 03:28:59 +0300 Subject: [PATCH 3/4] emby. Adding more configuration for port bindings. Default bind IP is 0.0.0.0 to allow direct connections. --- emby/.env.dist | 4 +++- emby/docker-compose.yml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/emby/.env.dist b/emby/.env.dist index 16b197f..3cdb2db 100644 --- a/emby/.env.dist +++ b/emby/.env.dist @@ -11,9 +11,11 @@ HOST_MULTIMEDIA_DIR=/mnt/multimedia # Leave as it is unless you really need something else INT_MULTIMEDIA_DIR=/libraries -WEBUI_BIND_ADDR=127.0.0.1 +WEBUI_BIND_ADDR=0.0.0.0 WEBUI_BIND_PORT=8096 +WEBUI_INT_BIND_PORT=8096 #WEBUI_HTTPS_BIND_PORT=8920 +#WEBUI_INT_HTTPS_BIND_PORT=8920 LOG_MAX_SIZE=5m LOG_MAX_FILE=5 \ No newline at end of file diff --git a/emby/docker-compose.yml b/emby/docker-compose.yml index 14de37a..14d56d4 100644 --- a/emby/docker-compose.yml +++ b/emby/docker-compose.yml @@ -9,9 +9,9 @@ services: - "${HOST_CONFIG_DIR:-./config}:/config" - "${HOST_MULTIMEDIA_DIR}:${INT_MULTIMEDIA_DIR:-/libraries}" ports: - - "${WEBUI_BIND_ADDR:-127.0.0.1}:${WEBUI_BIND_PORT:-8096}:8096/tcp" + - "${WEBUI_BIND_ADDR:-127.0.0.1}:${WEBUI_BIND_PORT:-8096}:${WEBUI_INT_BIND_PORT:-8096}/tcp" # Use reverse-proxy instead - #- "${WEBUI_BIND_ADDR-127.0.0.1}:${WEBUI_HTTPS_BIND_PORT:-8920}:8920/tcp" + #- "${WEBUI_BIND_ADDR-127.0.0.1}:${WEBUI_HTTPS_BIND_PORT:-8920}:${WEBUI_INT_HTTPS_BIND_PORT:-8920}/tcp" env_file: .env environment: UID: "${HOST_USER:-1000}" -- 2.43.5 From c1924b1211f7bc5572cc1c82c37dfb61397e302a Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Fri, 18 Mar 2022 03:30:31 +0300 Subject: [PATCH 4/4] emby. Marked as tested. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ec4e79..5f36c51 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Not every stack is tested to fully work. | ARK Server | ✅ | `thmhoag/arkserver` | ARK: Survival Evolved game server with ArkManager. | [Website](http://playark.com), [Steam](https://store.steampowered.com/app/346110/ARK_Survival_Evolved/), [Image Github](https://github.com/thmhoag/arkserver), [ArkManager](https://github.com/arkmanager/ark-server-tools) | | Duplicati | ✅ | `linuxserver/duplicati` | Backup solution with many storage backends. | [Website](https://www.duplicati.com), [Github](https://github.com/duplicati/duplicati) | | Element-web | ✅ | `vectorim/element-web` | Web Matrix client. | [Website](https://element.io), [Github](https://github.com/vector-im/element-web/) | -| emby | Not tested | `emby/embyserver` | Media server with online transcoding support. | [Website](https://emby.media) | +| emby | ✅ | `emby/embyserver` | Media server with online transcoding support. | [Website](https://emby.media) | | Folding@Home | ✅ | `johnktims/folding-at-home` | Protein folding distributed computing platform. | [Website](https://foldingathome.org), [My guide](https://skobk.in/2020/06/folding-at-home-quick-start/) | | Gatus | ✅ | `twinproduction/gatus` | Advanced service(s) status page. | [Website](https://gatus.io), [Github](https://github.com/TwiN/gatus) | | Gitea | ✅ | `gitea/gitea` | Lightweight Git hosting platfom. | [Website](https://gitea.io/), [Github](https://github.com/go-gitea/gitea) | -- 2.43.5