Files
chongming_lite/README.md
T

82 lines
1.1 KiB
Markdown
Raw Normal View History

2026-03-06 17:57:44 +08:00
# chongming
[TOC]
作者: chakcy
版本: 0.1.0
## 运行项目
uv 环境
```shell
uv run serve
```
纯 python 环境
```shell
python -m venv .venv
source .venv/bin/activate # windwows 命令为 .venv\Scripts\activate
pip install -r requirements.txt
pip install -e .
serve
```
## 打包项目
uv 环境
```shell
uv run build
```
纯 python 环境
```shell
source .venv/bin/activate # windwows 命令为 .venv\Scripts\activate
build
```
打包出来的文件在 build 目录下
```text
build
├── resources
│   ├── chongming.ico
│   ├── plugins.mbank
│   └── app.mbank
├── config.toml
├── db.sqlite3
└── chongming # windows chongming.exe
```
运行打包后的项目
```shell
cd build
chongming # windows chongming.exe
```
2026-04-26 15:26:01 +08:00
## docker镜像
打包镜像
```shell
docker build -t chongming:latest .
```
导出镜像
```shell
2026-04-26 20:44:18 +08:00
docker save -o chongming_latest.tar chongming:latest
2026-04-26 15:26:01 +08:00
```
导入镜像
```shell
2026-04-26 20:44:18 +08:00
docker load -i chongming_latest.tar
2026-04-26 15:26:01 +08:00
```
运行镜像
```shell
2026-04-27 11:01:33 +08:00
sudo chmod 777 ./deploy.sh
./deploy.sh
2026-04-26 15:26:01 +08:00
```