modify: 功能tongbu

This commit is contained in:
2026-04-29 11:24:19 +08:00
parent b1968f5ddc
commit 2dfa836acb
69 changed files with 4817 additions and 518 deletions
+29 -7
View File
@@ -42,13 +42,12 @@ build
```text
build
├── resources
│   ├── {{ cookiecutter.project_name }}.ico
│   ├── plugins.mbank
│   └── app.mbank
├── config.toml
├── db.sqlite3
└── {{ cookiecutter.project_name }} # windows {{ cookiecutter.project_name }}.exe
build/
├── {{ cookiecutter.project_name }} # 单文件可执行程序 (Linux) 或 {{ cookiecutter.project_name }}.exe (Windows)
├── config.toml # 生产配置(密钥已注入)
├── resources/ # 加密的模块银行 (.mbank) 和图标
├── static.svfs # Vue 前端虚拟文件系统
└── data/ # 初始 SQLite 数据库
```
运行打包后的项目
@@ -56,3 +55,26 @@ build
cd build
{{ cookiecutter.project_name }} # windows {{ cookiecutter.project_name }}.exe
```
## Docker 部署
Docker 镜像采用多角度构建 + `scratch` 基础镜像,真正做到最小化。
### 构建镜像
```bash
docker build -t {{ cookiecutter.project_name }}:latest .
```
### 执行部署脚本
```bash
sudo chmod +x deploy.sh
./deploy.sh
```
部署脚本会:
- 在 `$HOME/{{ cookiecutter.project_name }}-data` 下创建 `data/`, `uploads/`, `logs/` 目录
- 若首次运行,从镜像提取初始数据库
- 启动容器并挂载上述目录,端口 `8000` 映射
- 自动设置 `--restart unless-stopped`