diff --git a/.env.example b/.env.example index b1d1abb..c7d872d 100644 --- a/.env.example +++ b/.env.example @@ -5,6 +5,7 @@ ALISTEN_ALLOWED_ORIGINS="" # 逗号分隔的 Origin 允许 ALISTEN_LOG_LEVEL=info # 日志等级, 可选值为 debug、info、warn、error ALISTEN_WORKER_TMP_SIZE="1g" # Worker 临时文件大小 ALISTEN_ADMIN_TOKEN="" # 进入管理后台需要的凭证, 留空则禁用后台 +ALISTEN_VERSION="" # 部署的 Release 版本号, 例如 0.2.3 # 公网访问相关 ACME_EMAIL="" # Let's Encrypt 邮箱 diff --git a/README.md b/README.md index d2d21b6..0649365 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ ```bash cp .env.example .env -# 在 .env 中设置后台 token +# 在 .env 中设置后台 token 和部署的版本号 docker compose up -d --wait ``` @@ -34,8 +34,9 @@ docker compose \ 更新: ```bash -docker compose pull -# 然后使用你原来的启动命令重新启动 +vim .env +# 将 ALISTEN_VERSION 修改为目标版本号 +# 然后使用原来的部署命令重新启动 ``` 修改源代码后,自行构建和启动: @@ -63,6 +64,20 @@ helm install alisten \ -f values.yaml ``` +更新: + +```bash +# 命令中的 替换为真实的版本号 +helm upgrade alisten \ + oci://ghcr.io/dihemoe/alisten/charts/alisten \ + --version \ + --namespace alisten \ + -f values.yaml \ + --atomic \ + --wait \ + --timeout 6m +``` + ## 使用与版权 本项目不提供音源内容及其使用授权。音源名称、音频、封面和歌词等内容的权利归各自权利人所有。 diff --git a/compose.local.yaml b/compose.local.yaml index 67dcfee..f81d3a5 100644 --- a/compose.local.yaml +++ b/compose.local.yaml @@ -1,19 +1,24 @@ +# 本地构建的镜像打上 local 标签,不覆盖本机拉取的同版本正式镜像。 services: migrate: + image: ghcr.io/dihemoe/alisten/server:local pull_policy: never serve: + image: ghcr.io/dihemoe/alisten/server:local pull_policy: never build: context: . worker: + image: ghcr.io/dihemoe/alisten/worker:local pull_policy: never build: context: . dockerfile: worker.Dockerfile web: + image: ghcr.io/dihemoe/alisten/web:local pull_policy: never build: context: . diff --git a/compose.yaml b/compose.yaml index 74bbdb8..47fc73d 100644 --- a/compose.yaml +++ b/compose.yaml @@ -19,7 +19,7 @@ x-alisten-env: &alisten-env services: migrate: - image: ghcr.io/dihemoe/alisten/server:latest + image: ghcr.io/dihemoe/alisten/server:${ALISTEN_VERSION:-latest} command: migrate environment: *alisten-env depends_on: @@ -33,7 +33,7 @@ services: disable: true serve: - image: ghcr.io/dihemoe/alisten/server:latest + image: ghcr.io/dihemoe/alisten/server:${ALISTEN_VERSION:-latest} command: serve restart: unless-stopped environment: @@ -54,7 +54,7 @@ services: stop_grace_period: 30s worker: - image: ghcr.io/dihemoe/alisten/worker:latest + image: ghcr.io/dihemoe/alisten/worker:${ALISTEN_VERSION:-latest} command: worker restart: unless-stopped environment: *alisten-env @@ -71,7 +71,7 @@ services: stop_grace_period: 30s web: - image: ghcr.io/dihemoe/alisten/web:latest + image: ghcr.io/dihemoe/alisten/web:${ALISTEN_VERSION:-latest} restart: unless-stopped ports: - "${ALISTEN_HOST}:${ALISTEN_PORT}:8080"