From 09d29c4c1775dc6baa437d3d2ed592a630637f3a Mon Sep 17 00:00:00 2001 From: okxlin Date: Tue, 18 Jun 2024 01:16:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9plex=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/plex/1.40.3/.env.sample | 17 +++ apps/plex/1.40.3/data.yml | 123 ++++++++++++++++++ apps/plex/1.40.3/docker-compose.yml | 31 +++++ apps/plex/latest/.env.sample | 16 +-- apps/plex/latest/data.yml | 96 +++++--------- apps/plex/latest/docker-compose.yml | 21 ++- .../.env.sample | 0 .../data.yml | 0 .../docker-compose.yml | 2 +- 9 files changed, 217 insertions(+), 89 deletions(-) create mode 100644 apps/plex/1.40.3/.env.sample create mode 100644 apps/plex/1.40.3/data.yml create mode 100644 apps/plex/1.40.3/docker-compose.yml rename apps/plex/{1.40.3.8555-fef15d30c => official-latest}/.env.sample (100%) rename apps/plex/{1.40.3.8555-fef15d30c => official-latest}/data.yml (100%) rename apps/plex/{1.40.3.8555-fef15d30c => official-latest}/docker-compose.yml (95%) diff --git a/apps/plex/1.40.3/.env.sample b/apps/plex/1.40.3/.env.sample new file mode 100644 index 00000000..b7bd0d40 --- /dev/null +++ b/apps/plex/1.40.3/.env.sample @@ -0,0 +1,17 @@ +CONTAINER_NAME="plex" +LIBRARY_PATH="./data/library" +MOVIES_PATH="./data/movies" +PANEL_APP_PORT_HTTP="32400" +PANEL_APP_PORT_TCP_3005="3005" +PANEL_APP_PORT_TCP_32469="32469" +PANEL_APP_PORT_TCP_8324="8324" +PANEL_APP_PORT_UDP_1900="1900" +PANEL_APP_PORT_UDP_32410="32410" +PANEL_APP_PORT_UDP_32412="32412" +PANEL_APP_PORT_UDP_32413="32413" +PANEL_APP_PORT_UDP_32414="32414" +PGID="1000" +PLEX_CLAIM="" +PUID="1000" +TIMEZONE="Asia/Shanghai" +TVSERIES_PATH="./data/tv" diff --git a/apps/plex/1.40.3/data.yml b/apps/plex/1.40.3/data.yml new file mode 100644 index 00000000..6d9a99c6 --- /dev/null +++ b/apps/plex/1.40.3/data.yml @@ -0,0 +1,123 @@ +additionalProperties: + formFields: + - default: "32400" + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port 32400 (TCP) + labelZh: 端口 32400 (TCP) + required: true + rule: paramPort + type: number + - default: "3005" + edit: true + envKey: PANEL_APP_PORT_TCP_3005 + labelEn: Port 3005 (TCP) + labelZh: 端口 3005 (TCP) + required: true + rule: paramPort + type: number + - default: "8324" + edit: true + envKey: PANEL_APP_PORT_TCP_8324 + labelEn: Port 8324 (TCP) + labelZh: 端口 8324 (TCP) + required: true + rule: paramPort + type: number + - default: "32469" + edit: true + envKey: PANEL_APP_PORT_TCP_32469 + labelEn: Port 32469 (TCP) + labelZh: 端口 32469 (TCP) + required: true + rule: paramPort + type: number + - default: "1900" + edit: true + envKey: PANEL_APP_PORT_UDP_1900 + labelEn: Port 1900 (UDP) + labelZh: 端口 1900 (UDP) + required: true + rule: paramPort + type: number + - default: "32410" + edit: true + envKey: PANEL_APP_PORT_UDP_32410 + labelEn: Port 32410 (UDP) + labelZh: 端口 32410 (UDP) + required: true + rule: paramPort + type: number + - default: "32412" + edit: true + envKey: PANEL_APP_PORT_UDP_32412 + labelEn: Port 32412 (UDP) + labelZh: 端口 32412 (UDP) + required: true + rule: paramPort + type: number + - default: "32413" + edit: true + envKey: PANEL_APP_PORT_UDP_32413 + labelEn: Port 32413 (UDP) + labelZh: 端口 32413 (UDP) + required: true + rule: paramPort + type: number + - default: "32414" + edit: true + envKey: PANEL_APP_PORT_UDP_32414 + labelEn: Port 32414 (UDP) + labelZh: 端口 32414 (UDP) + required: true + rule: paramPort + type: number + - default: "Asia/Shanghai" + edit: true + envKey: TIMEZONE + labelEn: Timezone + labelZh: 时区 + required: true + type: text + - default: "" + edit: true + envKey: PLEX_CLAIM + labelEn: Plex Claim + labelZh: Plex 认证令牌 + required: false + type: text + - default: "1000" + edit: true + envKey: PUID + labelEn: User ID + labelZh: 用户 ID + required: false + type: number + - default: "1000" + edit: true + envKey: PGID + labelEn: Group ID + labelZh: 组 ID + required: false + type: number + - default: "./data/library" + edit: true + envKey: LIBRARY_PATH + labelEn: Library Path + labelZh: Library 路径 + required: true + type: text + - default: "./data/tv" + edit: true + envKey: TVSERIES_PATH + labelEn: TV Series Path + labelZh: 电视剧路径 + required: true + type: text + - default: "./data/movies" + edit: true + envKey: MOVIES_PATH + labelEn: Movies Path + labelZh: 电影路径 + required: true + type: text diff --git a/apps/plex/1.40.3/docker-compose.yml b/apps/plex/1.40.3/docker-compose.yml new file mode 100644 index 00000000..4e8389a0 --- /dev/null +++ b/apps/plex/1.40.3/docker-compose.yml @@ -0,0 +1,31 @@ +services: + plex: + image: "linuxserver/plex:1.40.3" + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:32400/tcp" + - "${PANEL_APP_PORT_TCP_3005}:3005/tcp" + - "${PANEL_APP_PORT_TCP_8324}:8324/tcp" + - "${PANEL_APP_PORT_TCP_32469}:32469/tcp" + - "${PANEL_APP_PORT_UDP_1900}:1900/udp" + - "${PANEL_APP_PORT_UDP_32410}:32410/udp" + - "${PANEL_APP_PORT_UDP_32412}:32412/udp" + - "${PANEL_APP_PORT_UDP_32413}:32413/udp" + - "${PANEL_APP_PORT_UDP_32414}:32414/udp" + environment: + - PUID=${PUID} + - PGID=${PGID} + - TZ=${TIMEZONE} + - VERSION=docker + - PLEX_CLAIM=${PLEX_CLAIM} + volumes: + - ${LIBRARY_PATH}:/config + - ${TVSERIES_PATH}:/tv + - ${MOVIES_PATH}:/movies + +networks: + 1panel-network: + external: true diff --git a/apps/plex/latest/.env.sample b/apps/plex/latest/.env.sample index 0a6aea20..b7bd0d40 100644 --- a/apps/plex/latest/.env.sample +++ b/apps/plex/latest/.env.sample @@ -1,11 +1,6 @@ -ADVERTISE_IP="http://localhost:32400/" -ALLOWED_NETWORKS="192.168.1.0/24,172.18.0.0/16" -CHANGE_CONFIG_DIR_OWNERSHIP="true" -CLAIM_TOKEN="" CONTAINER_NAME="plex" -DATABASE_PATH="./data/plex/database" -HOSTNAME="plex" -MEDIA_PATH="./data/media" +LIBRARY_PATH="./data/library" +MOVIES_PATH="./data/movies" PANEL_APP_PORT_HTTP="32400" PANEL_APP_PORT_TCP_3005="3005" PANEL_APP_PORT_TCP_32469="32469" @@ -15,7 +10,8 @@ PANEL_APP_PORT_UDP_32410="32410" PANEL_APP_PORT_UDP_32412="32412" PANEL_APP_PORT_UDP_32413="32413" PANEL_APP_PORT_UDP_32414="32414" -PLEX_GID="" -PLEX_UID="" +PGID="1000" +PLEX_CLAIM="" +PUID="1000" TIMEZONE="Asia/Shanghai" -TRANSCODE_PATH="./data/transcode/temp" +TVSERIES_PATH="./data/tv" diff --git a/apps/plex/latest/data.yml b/apps/plex/latest/data.yml index 26ccf22b..6d9a99c6 100644 --- a/apps/plex/latest/data.yml +++ b/apps/plex/latest/data.yml @@ -81,77 +81,43 @@ additionalProperties: type: text - default: "" edit: true - envKey: CLAIM_TOKEN - labelEn: Claim Token - labelZh: 声明令牌 + envKey: PLEX_CLAIM + labelEn: Plex Claim + labelZh: Plex 认证令牌 required: false type: text - - default: "http://localhost:32400/" + - default: "1000" edit: true - envKey: ADVERTISE_IP - labelEn: External URL - labelZh: 外部访问地址 - required: true - rule: paramExtUrl - type: text - - default: "plex" - edit: true - envKey: HOSTNAME - labelEn: Hostname - labelZh: 主机名 - required: true - type: text - - default: "./data/plex/database" - edit: true - envKey: DATABASE_PATH - labelEn: Database Path - labelZh: 数据库路径 - required: true - type: text - - default: "./data/transcode/temp" - edit: true - envKey: TRANSCODE_PATH - labelEn: Transcode Path - labelZh: 转码路径 - required: true - type: text - - default: "./data/media" - edit: true - envKey: MEDIA_PATH - labelEn: Media Path - labelZh: 媒体路径 - required: true - type: text - - default: "" - edit: true - envKey: PLEX_UID - labelEn: Plex UID - labelZh: Plex 用户 ID + envKey: PUID + labelEn: User ID + labelZh: 用户 ID required: false - type: text - - default: "" + type: number + - default: "1000" edit: true - envKey: PLEX_GID - labelEn: Plex GID - labelZh: Plex 组 ID + envKey: PGID + labelEn: Group ID + labelZh: 组 ID required: false - type: text - - default: "true" - envKey: CHANGE_CONFIG_DIR_OWNERSHIP - labelEn: Change Config Dir Ownership - labelZh: 更改配置目录所有权 + type: number + - default: "./data/library" + edit: true + envKey: LIBRARY_PATH + labelEn: Library Path + labelZh: Library 路径 required: true - type: select + type: text + - default: "./data/tv" edit: true - values: - - label: "True" - value: "true" - - label: "False" - value: "false" - - default: "192.168.1.0/24,172.18.0.0/16" + envKey: TVSERIES_PATH + labelEn: TV Series Path + labelZh: 电视剧路径 + required: true + type: text + - default: "./data/movies" edit: true - envKey: ALLOWED_NETWORKS - labelEn: Allowed Networks - labelZh: 允许的网络 - required: false - type: text \ No newline at end of file + envKey: MOVIES_PATH + labelEn: Movies Path + labelZh: 电影路径 + required: true + type: text diff --git a/apps/plex/latest/docker-compose.yml b/apps/plex/latest/docker-compose.yml index 49af0ea0..ebb89cc6 100644 --- a/apps/plex/latest/docker-compose.yml +++ b/apps/plex/latest/docker-compose.yml @@ -1,6 +1,6 @@ services: plex: - image: "plexinc/pms-docker:latest" + image: "linuxserver/plex:latest" container_name: ${CONTAINER_NAME} restart: always networks: @@ -16,20 +16,15 @@ services: - "${PANEL_APP_PORT_UDP_32413}:32413/udp" - "${PANEL_APP_PORT_UDP_32414}:32414/udp" environment: + - PUID=${PUID} + - PGID=${PGID} - TZ=${TIMEZONE} - - PLEX_CLAIM=${CLAIM_TOKEN} - - ADVERTISE_IP=${ADVERTISE_IP} - - HOSTNAME=${HOSTNAME} - - PLEX_UID=${PLEX_UID} - - PLEX_GID=${PLEX_GID} - - CHANGE_CONFIG_DIR_OWNERSHIP=${CHANGE_CONFIG_DIR_OWNERSHIP} - - ALLOWED_NETWORKS=${ALLOWED_NETWORKS} + - VERSION=docker + - PLEX_CLAIM=${PLEX_CLAIM} volumes: - - ${DATABASE_PATH}:/config - - ${TRANSCODE_PATH}:/transcode - - ${MEDIA_PATH}:/data - labels: - createdBy: "Apps" + - ${LIBRARY_PATH}:/config + - ${TVSERIES_PATH}:/tv + - ${MOVIES_PATH}:/movies networks: 1panel-network: diff --git a/apps/plex/1.40.3.8555-fef15d30c/.env.sample b/apps/plex/official-latest/.env.sample similarity index 100% rename from apps/plex/1.40.3.8555-fef15d30c/.env.sample rename to apps/plex/official-latest/.env.sample diff --git a/apps/plex/1.40.3.8555-fef15d30c/data.yml b/apps/plex/official-latest/data.yml similarity index 100% rename from apps/plex/1.40.3.8555-fef15d30c/data.yml rename to apps/plex/official-latest/data.yml diff --git a/apps/plex/1.40.3.8555-fef15d30c/docker-compose.yml b/apps/plex/official-latest/docker-compose.yml similarity index 95% rename from apps/plex/1.40.3.8555-fef15d30c/docker-compose.yml rename to apps/plex/official-latest/docker-compose.yml index 5b821931..49af0ea0 100644 --- a/apps/plex/1.40.3.8555-fef15d30c/docker-compose.yml +++ b/apps/plex/official-latest/docker-compose.yml @@ -1,6 +1,6 @@ services: plex: - image: "plexinc/pms-docker:1.40.3.8555-fef15d30c" + image: "plexinc/pms-docker:latest" container_name: ${CONTAINER_NAME} restart: always networks: