fix library display and docker compose update

This commit is contained in:
ShukeBta
2026-06-27 16:54:33 +08:00
parent 41f39d9701
commit a2be6a2127
19 changed files with 701 additions and 88 deletions
+7 -8
View File
@@ -3,7 +3,7 @@ import type { SettingGroup } from './settingsGroupTypes'
export const systemUpdateSettingsGroup: SettingGroup = {
key: 'system-update',
label: '系统更新',
description: 'Docker 部署可在这里检查并拉取最新版镜像。',
description: 'Docker Compose 部署可在这里检查并拉取最新版镜像。',
items: [
{
key: 'system.update.image',
@@ -14,20 +14,19 @@ export const systemUpdateSettingsGroup: SettingGroup = {
hint: '用于检查远端摘要;保持 latest 即可跟随主分支镜像。',
},
{
key: 'system.update.watchtower_image',
label: 'Watchtower 镜像',
key: 'system.update.compose_dir',
label: 'Docker Compose 安装目录',
type: 'text',
defaultValue: 'containrrr/watchtower:latest',
placeholder: 'containrrr/watchtower:latest',
hint: '默认使用一次性 Watchtower 更新当前容器。',
placeholder: '/vol1/1000/docker/mediastation-go',
hint: '留空时自动查找 docker-compose.yml / compose.yml 所在目录。',
},
{
key: 'system.update.command',
label: '自定义更新命令',
type: 'textarea',
placeholder:
'docker run --rm -v /var/run/docker.sock:/var/run/docker.sock {{watchtower_image}} --run-once --cleanup {{container}}',
hint: '留空时使用默认命令。支持 {{image}}、{{watchtower_image}}、{{container}}、{{container_id}}、{{container_name}}。',
'cd {{compose_dir}} && {{compose_command}} pull && {{compose_command}} up -d && docker image prune -f && docker restart {{container}}',
hint: '留空时使用 Docker Compose 默认命令。支持 {{image}}、{{compose_dir}}、{{compose_file}}、{{compose_command}}、{{container}}、{{container_id}}、{{container_name}}。',
},
],
}