Files
vox/README.md

56 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Vox (词脉)
智能单词挑战系统。
- **极速**Svelte 5 + Tailwind 4
- **智能**:错题本 + 专项练习
- **持久**SQLite 存储
```bash
npm i && npm run dev # Port: 1995
```
## Docker
### 1. 使用 Docker CLI
```bash
docker build -t vox-app .
docker run -p 1995:1995 -v $(pwd)/data.db:/app/data.db vox-app
```
### 2. 使用 Docker Compose (推荐)
```bash
# 以后台模式运行
docker-compose up -d
# 查看日志
docker-compose logs -f
```
### 3. 先编译后打包 (推荐:适用于性能较弱的服务器)
在本地预先编译,仅将结果推送到容器,可极大地减少部署时间。
```bash
# 1. 本地编译
npm install
npm run build
# 2. 使用精简版 Dockerfile 构建
docker build -t vox-fast -f Dockerfile.fast .
# 3. 运行
docker run -p 1995:1995 -v $(pwd)/data.db:/app/data.db vox-fast
```
### 4. 发布与分发 (镜像分发模式)
如果您想让其他用户像下载标准镜像一样直接使用:
```bash
# 1. 运行发布脚本(执行本地编译 + 镜像打包)
./release.sh
# 2. 推送到您的 Gitea 注册表
docker push gitea.qxy1828.com/chaos/vox:latest
```
用户端只需:
```bash
docker pull gitea.qxy1828.com/chaos/vox:latest
docker run -p 1995:1995 -v /path/to/data.db:/app/data.db gitea.qxy1828.com/chaos/vox:latest
```