fix(storage): 修复存储目标编辑不显示配置 & 添加文件列表API

- fix(storage): StorageOut 增加 config 字段并解密返回,编辑时可回填
- fix(storage): Storage ORM 模型添加 config property 支持序列化
- fix(env): 修正 SECRET_KEY 截断、FERNET_KEY 非法占位符问题
- fix(deploy): 后端从 Docker 容器迁移到 systemd 服务,存储目标路径改为宿主机真实路径
- feat(api): 新增 GET /api/storages/{id}/files 文件浏览端点
- feat(frontend): 新增 listFiles API 调用
- docs: 更新 README 反映部署方式变更
This commit is contained in:
Your Name
2026-07-27 13:45:18 +08:00
parent 07b2016f33
commit e7fba5abe5
11 changed files with 188 additions and 85 deletions
-31
View File
@@ -1,32 +1,4 @@
version: "3.9"
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
image: backup-system/backend:latest
container_name: backup-backend
env_file:
- .env
environment:
# 容器内默认存储根目录
STORAGE_LOCAL_ROOT: /app/data/backups
DATABASE_URL: sqlite:////app/data/backup.db
volumes:
# bind mounts: 数据直接落到项目目录下
- ./data/backend:/app/data
- ./data/logs:/app/logs
ports:
- "8765:8000"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
interval: 30s
timeout: 5s
retries: 5
start_period: 20s
frontend:
build:
context: ./frontend
@@ -35,7 +7,4 @@ services:
container_name: backup-frontend
ports:
- "5173:80"
depends_on:
backend:
condition: service_healthy
restart: unless-stopped