fix: pin compose deployments to a release version
This commit is contained in:
1 parent
b12dfcebb6
commit
41bf78d110
4 files changed
+28
-7
No files matched your search
@@ -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 邮箱
|
||||
|
||||
@@ -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
|
||||
# 命令中的 <release-version> 替换为真实的版本号
|
||||
helm upgrade alisten \
|
||||
oci://ghcr.io/dihemoe/alisten/charts/alisten \
|
||||
--version <release-version> \
|
||||
--namespace alisten \
|
||||
-f values.yaml \
|
||||
--atomic \
|
||||
--wait \
|
||||
--timeout 6m
|
||||
```
|
||||
|
||||
## 使用与版权
|
||||
|
||||
本项目不提供音源内容及其使用授权。音源名称、音频、封面和歌词等内容的权利归各自权利人所有。
|
||||
|
||||
@@ -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: .
|
||||
|
||||
+4
-4
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user