2026-04-08 17:13:52 +08:00
2026-04-08 16:30:42 +08:00
2026-04-08 17:13:52 +08:00
2026-04-08 17:13:52 +08:00
2026-04-08 16:30:42 +08:00
2026-04-08 16:30:42 +08:00
2026-04-08 16:30:42 +08:00
2026-04-08 16:30:42 +08:00
2026-04-08 17:13:52 +08:00

order-site-workspace

统一工作区版本的订单自动兑换系统。

目录结构

apps/
  backend/   Node + Express + Playwright + OCR worker
  frontend/  Vue 3 + Vite + Element Plus
deploy/
  caddy/     Caddy 配置
  docker/    Dockerfile
docs/        迁移与部署文档
docker-compose.yml

本地开发

前端:

cd apps/frontend
npm install
npm run dev

后端:

cd apps/backend
npm install
cd subservices/ocr-worker
uv sync
cd ../..
cp config/local.example.cjs config/local.cjs
npm run dev

Docker 部署

cp .env.example .env
docker compose build
docker compose up -d

当前 Dockerfile 已默认针对国内服务器优化以下下载源:

  • Debian apt 使用腾讯云镜像
  • npm 使用 npmmirror
  • Playwright 浏览器默认先尝试 npmmirror,失败后自动回退官方源
  • uv 通过 pip 安装,uv / pip 使用腾讯云 PyPI 镜像

如果你的服务器网络环境不同,也可以在构建时覆盖:

docker compose build \
  --build-arg DEBIAN_MIRROR=mirrors.tuna.tsinghua.edu.cn \
  --build-arg NPM_REGISTRY=https://registry.npmjs.org \
  --build-arg PLAYWRIGHT_DOWNLOAD_HOST=https://playwright.azureedge.net \
  --build-arg UV_DEFAULT_INDEX=https://pypi.org/simple

默认入口:

  • 前端与领取页:https://你的域名/
  • 后端健康检查:https://你的域名/health
  • 后端接口前缀:https://你的域名/api/v1/...

详细文档:

迁移原则

  • 不重写现有业务代码
  • 先统一目录、部署和配置
  • 生产环境优先使用 .env 和 Docker 卷
S
Description
No description provided
Readme
13 MiB
Languages
TypeScript 96.3%
CSS 2%
Shell 1.5%
Dockerfile 0.1%
JavaScript 0.1%