From 048f32f8d88676e6821ea97bd39d57db68ca61ea Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Fri, 18 Mar 2022 03:31:59 +0300 Subject: [PATCH] Emby media server. (#23) Solves #22. Reviewed-on: https://git.skobk.in/skobkin/docker-stacks/pulls/23 --- README.md | 1 + emby/.env.dist | 21 +++++++++++++++++++++ emby/config/.gitignore | 2 ++ emby/docker-compose.yml | 24 ++++++++++++++++++++++++ emby/nginx/emby.conf | 25 +++++++++++++++++++++++++ 5 files changed, 73 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..5f36c51 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 | ✅ | `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..3cdb2db --- /dev/null +++ b/emby/.env.dist @@ -0,0 +1,21 @@ +# see https://hub.docker.com/r/linuxserver/syncthing +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 +# Leave as it is unless you really need something else +INT_MULTIMEDIA_DIR=/libraries + +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/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..14d56d4 --- /dev/null +++ b/emby/docker-compose.yml @@ -0,0 +1,24 @@ +# https://hub.docker.com/r/emby/embyserver +version: '3.7' + +services: + emby: + image: "${DOCKER_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}:${WEBUI_INT_BIND_PORT:-8096}/tcp" + # Use reverse-proxy instead + #- "${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}" + 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