Skip to content

Commit

Permalink
feat: 🎸 修改glue为metadata,解决emby配置更新错误
Browse files Browse the repository at this point in the history
  • Loading branch information
monlor committed May 31, 2024
1 parent db6af91 commit 224ac6f
Show file tree
Hide file tree
Showing 14 changed files with 70 additions and 138 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ jobs:
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
echo "ALIST_TAGS=${IMAGE_PREFIX}/xiaoya-alist:latest,${IMAGE_PREFIX}/xiaoya-alist:${VERSION}" >> $GITHUB_ENV
echo "GLUE_TAGS=${IMAGE_PREFIX}/xiaoya-glue:latest,${IMAGE_PREFIX}/xiaoya-glue:${VERSION}" >> $GITHUB_ENV
echo "METADATA_TAGS=${IMAGE_PREFIX}/xiaoya-metadata:latest,${IMAGE_PREFIX}/xiaoya-metadata:${VERSION}" >> $GITHUB_ENV
echo "EMBY_TAGS=${IMAGE_PREFIX}/xiaoya-emby:latest,${IMAGE_PREFIX}/xiaoya-emby:${VERSION}" >> $GITHUB_ENV
echo "JELLYFIN_TAGS=${IMAGE_PREFIX}/xiaoya-jellyfin:latest,${IMAGE_PREFIX}/xiaoya-jellyfin:${VERSION}" >> $GITHUB_ENV
echo "RESILIO_TAGS=${IMAGE_PREFIX}/xiaoya-resilio:latest,${IMAGE_PREFIX}/xiaoya-resilio:${VERSION}" >> $GITHUB_ENV
else
# 使用分支作为tag
LATEST_TAG=${GITHUB_REF#refs/heads/}
echo "ALIST_TAGS=${IMAGE_PREFIX}/xiaoya-alist:${LATEST_TAG}" >> $GITHUB_ENV
echo "GLUE_TAGS=${IMAGE_PREFIX}/xiaoya-glue:${LATEST_TAG}" >> $GITHUB_ENV
echo "METADATA_TAGS=${IMAGE_PREFIX}/xiaoya-metadata:${LATEST_TAG}" >> $GITHUB_ENV
echo "EMBY_TAGS=${IMAGE_PREFIX}/xiaoya-emby:${LATEST_TAG}" >> $GITHUB_ENV
echo "JELLYFIN_TAGS=${IMAGE_PREFIX}/xiaoya-jellyfin:${LATEST_TAG}" >> $GITHUB_ENV
echo "RESILIO_TAGS=${IMAGE_PREFIX}/xiaoya-resilio:${LATEST_TAG}" >> $GITHUB_ENV
Expand All @@ -73,12 +73,12 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new

- name: Build and push xiaoya-glue
- name: Build and push xiaoya-metadata
uses: docker/build-push-action@v4
with:
context: ./glue
context: ./metadata
push: true
tags: ${{ env.GLUE_TAGS }}
tags: ${{ env.METADATA_TAGS }}
platforms: linux/amd64,linux/arm64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* 合并jellyfin和emby的x86和arm镜像,部署时无需区分镜像名
* 集成清理脚本到alist服务,无需单独部署
* 通过环境变量配置阿里云盘token,无需映射文件
* 元数据下载的流程集成到glue服务,自动下载
* 元数据下载的流程集成到metadata服务,自动下载
* jellyfin和emby启动时自动进行依赖检查,等待元数据下载完成,自动添加hosts
* 完全兼容所有能运行docker的x86和arm设备
* 支持自动清理阿里云盘,自动同步小雅元数据
Expand Down Expand Up @@ -113,10 +113,10 @@ docker run -d --name alist \
ghcr.io/monlor/xiaoya-alist
```

4. 启动glue用于元数据同步
4. 启动metadata用于元数据同步

```bash
docker run -d --name glue \
docker run -d --name metadata \
-e LANG=C.UTF-8 \
-e EMBY_ENABLED=true \
-e JELLYFIN_ENABLED=false \
Expand All @@ -129,7 +129,7 @@ docker run -d --name glue \
-v cache:/media/config/cache \
-v meta:/media/temp \
--network=xiaoya \
ghcr.io/monlor/xiaoya-glue
ghcr.io/monlor/xiaoya-metadata
```

5. 启动emby服务
Expand Down Expand Up @@ -164,7 +164,7 @@ docker run -d --name resilio \
## 安全建议

* 开启alist的登陆,alist服务设置`FORCE_LOGIN=true`,设置webdav的密码`WEBDAV_PASSWORD`
* 在emby控制台修改ApiKey,glue服务设置`EMBY_APIKEY`,用于定期同步emby配置
* 在emby控制台修改ApiKey,metadata服务设置`EMBY_APIKEY`,用于定期同步emby配置

## 参考

Expand Down
66 changes: 0 additions & 66 deletions alist/fix_media.sh

This file was deleted.

2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

docker build -t monlor/xiaoya-alist alist

docker build -t monlor/xiaoya-glue glue
docker build -t monlor/xiaoya-metadata metadata

docker build -t monlor/xiaoya-emby emby

Expand Down
1 change: 0 additions & 1 deletion docker-compose-alist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ version: '3'
services:
alist:
image: ghcr.io/monlor/xiaoya-alist
container_name: alist
volumes:
- xiaoya:/data
ports:
Expand Down
15 changes: 5 additions & 10 deletions docker-compose-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ version: '3'
services:
alist:
image: ghcr.io/monlor/xiaoya-alist
container_name: alist
volumes:
- xiaoya:/data
ports:
Expand All @@ -20,9 +19,8 @@ services:
restart: unless-stopped
networks:
- default
glue:
image: ghcr.io/monlor/xiaoya-glue
container_name: glue
metadata:
image: ghcr.io/monlor/xiaoya-metadata
environment:
- LANG=C.UTF-8
# - ALIST_ADDR=http://alist:5678
Expand All @@ -41,7 +39,6 @@ services:
- default
emby:
image: ghcr.io/monlor/xiaoya-emby
container_name: emby
environment:
- TZ=Asia/Shanghai
- GIDLIST=0
Expand All @@ -50,7 +47,7 @@ services:
devices:
- /dev/dri:/dev/dri
depends_on:
- glue
- metadata
- alist
volumes:
- media:/media
Expand All @@ -63,7 +60,6 @@ services:
- default
resilio:
image: ghcr.io/monlor/xiaoya-resilio
container_name: resilio
environment:
- TZ=Asia/Shanghai
ports:
Expand All @@ -73,22 +69,21 @@ services:
- media:/sync/xiaoya
- config:/sync/config
depends_on:
- glue
- metadata
- alist
restart: unless-stopped
networks:
- default
jellyfin:
image: ghcr.io/monlor/xiaoya-jellyfin
container_name: jellyfin
environment:
- TZ=Asia/Shanghai
# ALIST_ADDR=http://alist:5678
privileged: true
devices:
- /dev/dri:/dev/dri
depends_on:
- glue
- metadata
- alist
volumes:
- media:/media
Expand Down
9 changes: 3 additions & 6 deletions docker-compose-jellyfin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ version: '3'
services:
alist:
image: ghcr.io/monlor/xiaoya-alist
container_name: alist
volumes:
- xiaoya:/data
ports:
Expand All @@ -20,9 +19,8 @@ services:
restart: unless-stopped
networks:
- default
glue:
image: ghcr.io/monlor/xiaoya-glue
container_name: glue
metadata:
image: ghcr.io/monlor/xiaoya-metadata
environment:
- LANG=C.UTF-8
# - ALIST_ADDR=http://alist:5678
Expand All @@ -41,15 +39,14 @@ services:
- default
jellyfin:
image: ghcr.io/monlor/xiaoya-jellyfin
container_name: jellyfin
environment:
- TZ=Asia/Shanghai
# ALIST_ADDR=http://alist:5678
privileged: true
devices:
- /dev/dri:/dev/dri
depends_on:
- glue
- metadata
- alist
volumes:
- media:/media
Expand Down
12 changes: 4 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ version: '3'
services:
alist:
image: ghcr.io/monlor/xiaoya-alist
container_name: alist
volumes:
- xiaoya:/data
ports:
Expand All @@ -21,9 +20,8 @@ services:
restart: unless-stopped
networks:
- default
glue:
image: ghcr.io/monlor/xiaoya-glue
container_name: glue
metadata:
image: ghcr.io/monlor/xiaoya-metadata
environment:
- LANG=C.UTF-8
# - ALIST_ADDR=http://alist:5678
Expand All @@ -44,7 +42,6 @@ services:
- default
emby:
image: ghcr.io/monlor/xiaoya-emby
container_name: emby
environment:
- TZ=Asia/Shanghai
- GIDLIST=0
Expand All @@ -53,7 +50,7 @@ services:
devices:
- /dev/dri:/dev/dri
depends_on:
- glue
- metadata
- alist
volumes:
- media:/media
Expand All @@ -66,7 +63,6 @@ services:
- default
resilio:
image: ghcr.io/monlor/xiaoya-resilio
container_name: resilio
environment:
- TZ=Asia/Shanghai
ports:
Expand All @@ -76,7 +72,7 @@ services:
- media:/sync/xiaoya
- config:/sync/config
depends_on:
- glue
- metadata
- alist
restart: unless-stopped
networks:
Expand Down
4 changes: 2 additions & 2 deletions helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ releases:
hosts:
- host: alist.monlor.cn

- name: glue
- name: metadata
namespace: media
chart: monlor/quickchart
version: 0.2.6
Expand All @@ -62,7 +62,7 @@ releases:
kubernetes.io/hostname: nuc-1-node-1
image:
repository: ghcr.io
name: monlor/xiaoya-glue
name: monlor/xiaoya-metadata
tag: latest
pullPolicy: Always
env:
Expand Down
2 changes: 1 addition & 1 deletion glue/Dockerfile → metadata/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM xiaoyaliu/glue:latest
FROM xiaoyaliu/metadata:latest

WORKDIR /media

Expand Down
File renamed without changes.
Loading

0 comments on commit 224ac6f

Please sign in to comment.