Files
perler-lab/README.md
T
TomyS 99b13c310b
deploy-test / build-and-deploy-test (push) Failing after 6s
docs: 新增组织协作版README(环境/工作流/协作说明)
2026-09-17 13:36:36 +08:00

45 lines
2.0 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.
# Perler Lab 拼豆图纸库(组织协作版)
图片转拼豆图纸工具:上传图片 → 参数面板 → 预览画布 → 备料清单 → PNG 下载,另有 AI 专区(分类选择/生成确认)、兑换码与订单权益体系。
> 团队分工与作战计划见 [TEAM.md](./TEAM.md);竞品逆向见 [competitor-analysis/](./competitor-analysis)。
## 目录结构
```
perler-lab/ # 前端(React,经 Docker 构建为 web 镜像)
perler-lab-server/ # 后端(API:兑换码/订单/权益核销/AI 代理)
docs/ # 文档
.gitea/workflows/ # Gitea Actions 流水线(以此为准)
.github/workflows/ # GitHub 侧流水线(备用参考)
```
## 环境
| 环境 | 位置 | 前端 | 后端 | 说明 |
|------|------|------|------|------|
| 测试 | 156.233.226.86 | :80 | :8788(仅内网) | push 到 master 自动部署 |
| 生产 | 156.233.226.46 本机 | :8080 | :8788 | 手动触发,不自动上 |
- 镜像仓库:`156.233.226.46:5000`(`:test` / `:latest` 标签隔离,互不污染)
- 人机验证:前端 `/tac/api` 反代到 prod1 `18200`(经 WireGuard `10.9.0.2:18200`)
- 测试机数据库:`perler-lab-pg`(PG17,回环端口,测试独占)
## 工作流(.gitea/workflows)
- `deploy-test.yml`:push 到 `master`(或手动)→ 构建前后端镜像 → 推 `:test` → SSH 到测试机拉起 → 健康检查。配置走仓库 Secrets(`PERLER_DEPLOY_KEY/HOST`)。
- `deploy-prod.yml`:**手动 `workflow_dispatch` + `confirm=yes` 才跑** → 在 prod2 本机构建直跑 → 健康检查(含验证码反代检查)→ 通过后清理测试机旧容器。生产不上 prod1,注意与 homecentral 两段式的区别。
## 本地开发
```
./start-dev.bat # 启动前后端开发环境
./stop-dev.bat # 停止
```
## 协作
- 组织:`JC.Lab`(Owners 团队有写权限)
- 分支:`master` 即生产候选,push 即发测试;大改开 feature 分支,PR 合并
- 上游镜像源:`TomyS/perler-lab`(个人库,组织库以此为基准同步)