Compare commits

..
17 Commits
Author SHA1 Message Date
TomyS d26bee577c fix(ci): frontend改8081(宿主80/8080被占)
deploy-test / build-and-deploy-test (push) Successful in 1m34s
2026-11-06 18:50:01 +08:00
TomyS 901291fe85 fix(ci): pg本机端口改15433(15432被shared-pg占用)
deploy-test / build-and-deploy-test (push) Failing after 58s
2026-11-06 18:46:31 +08:00
TomyS 1339d0f399 fix(ci): deploy加残留容器前置清理
deploy-test / build-and-deploy-test (push) Failing after 48s
2026-11-06 18:44:19 +08:00
TomyS 31f0286acf fix(ci): registry经本机隧道127.0.0.1:5001(.86→.110公网5000被云防火墙拦)
deploy-test / build-and-deploy-test (push) Failing after 2m43s
2026-11-06 18:39:52 +08:00
TomyS 22e5fa0589 fix(ci): SSH改Secret注入,不再依赖runner挂载
deploy-test / build-and-deploy-test (push) Failing after 6m43s
2026-11-06 18:18:02 +08:00
TomyS a5d3ca5c66 fix(ci): 死IP参数化,TAC改云南主
deploy-test / build-and-deploy-test (push) Failing after 27s
2026-11-06 18:03:44 +08:00
TomyS 0b3f68d62b fix(ci): registry主迁38.76.218.110:5000
deploy-test / build-and-deploy-test (push) Failing after 33s
2026-11-06 18:02:53 +08:00
TomyS 9fa3d7569d chore: add bug issue template
deploy-test / build-and-deploy-test (push) Failing after 23s
2026-09-23 16:33:26 +08:00
fwdtest 48c4eded51 chore: permanent forwarder live test bug#2
deploy-test / build-and-deploy-test (push) Failing after 27s
2026-09-23 15:15:05 +08:00
zentao 95f2e7f191 chore: zentao-gitea link proof bug#1 sync test (3)
deploy-test / build-and-deploy-test (push) Failing after 27s
2026-09-23 14:58:49 +08:00
zentao 0ec2937789 chore: zentao-gitea link proof bug#1 sync test (2)
deploy-test / build-and-deploy-test (push) Failing after 30s
2026-09-23 14:56:47 +08:00
zentao 7da36d3ae2 chore: zentao-gitea link proof bug#1 sync test
deploy-test / build-and-deploy-test (push) Failing after 3m47s
2026-09-23 14:38:31 +08:00
TomyS cf0f6e25e2 fix(ci): keyscan走48222,22已是蜜罐
deploy-test / build-and-deploy-test (push) Successful in 35s
2026-09-17 18:07:30 +08:00
TomyS 695b77a670 chore(ci): SSH端口切48222
deploy-test / build-and-deploy-test (push) Failing after 7s
2026-09-17 17:11:36 +08:00
TomyS 4619a54666 更新 README.md
deploy-test / build-and-deploy-test (push) Successful in 29s
2026-09-17 14:15:20 +08:00
TomyS 15e38bbc2c fix(ci): 对齐home写法,端口变量+StrictHostKeyChecking内联+同名步骤
deploy-test / build-and-deploy-test (push) Successful in 47s
2026-09-17 13:53:31 +08:00
TomyS c28d518327 fix(ci): 测试流水线对齐硬化版,钥匙走runner挂载不再依赖Secrets 2026-09-17 13:50:14 +08:00
5 changed files with 77 additions and 24 deletions

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
---
name: Bug 反馈
about: 提交缺陷 / 回归失败反馈
title: "[Bug] "
labels:
- 回归失败
---
## 环境
- 版本/分支:
- 部署环境:
- 浏览器/客户端:
## 复现步骤
1.
2.
3.
## 预期结果
-
## 实际结果
-
## 关联历史 issue
- #号:
## 是否回归
- [ ] 回归(测试不通过,Reopen 原单勿新建)
- [ ] 新缺陷
+15 -3
View File
@@ -13,6 +13,18 @@ on:
description: '确认部署拼豆到生产环境? 输入 yes'
required: true
default: 'no'
cleanup_host:
description: '清理目标host(默认测试机; A/B定稿前勿改)'
required: false
default: '156.233.226.86'
cleanup_port:
description: '清理目标SSH端口'
required: false
default: '48222'
cleanup_user:
description: '清理目标用户'
required: false
default: 'root'
jobs:
deploy-prod:
@@ -51,7 +63,7 @@ jobs:
-e DATABASE_URL='postgres://pgsql:XGYnJPysCNJsLeea@postgres:5432/perler_lab' \
-e JWT_SECRET='ab0538194ce36bdb85afc22e608e5b548bc5717d4e5f7cda917701ef2c53bca6' \
-e TAC_ENABLED="true" \
-e TAC_API_BASE="http://10.9.0.2:18200" \
-e TAC_API_BASE="http://10.9.0.5:18200" \
-e TAC_SITE_KEY="6796bad8-4369-492f-a4d7-643a93bb07f3" \
-e TAC_SECRET_KEY="dae2c135-4e61-4249-a5bb-a15081b1a2b6" \
-p 8788:8788 \
@@ -61,7 +73,7 @@ jobs:
docker run -d --name perler-lab-frontend \
--restart unless-stopped \
--network perler-net \
-e CAPTCHA_UPSTREAM="10.9.0.2:18200" \
-e CAPTCHA_UPSTREAM="10.9.0.5:18200" \
-p 8080:80 \
perler-lab-frontend:latest
echo '容器已启动,等待健康检查...'
@@ -79,7 +91,7 @@ jobs:
# 版本已上生产,清理 test2 环境对应版本(新规则)
- name: Cleanup test2 env (version now in production)
run: |
ssh -o StrictHostKeyChecking=no -p 47222 root@171.80.10.85 "
ssh -o StrictHostKeyChecking=no -p ${{ inputs.cleanup_port }} ${{ inputs.cleanup_user }}@${{ inputs.cleanup_host }} "
docker stop perler-lab-server perler-lab-frontend 2>/dev/null && docker rm perler-lab-server perler-lab-frontend 2>/dev/null && echo '? test1 容器已清理(版本已上生产)' || echo '?? test1 清理失败或已不存在'
"
continue-on-error: true
+28 -20
View File
@@ -1,8 +1,9 @@
# 2026-11-06 t3修复稿(未合入,需Token后由用户合入):registry主迁127.0.0.1:5001(已补:test镜像),部署目标保持测试机.86:48222
# =============================================================================
# PERLER LAB — Gitea Actions 测试环境自动部署
# 触发:push 到 master(或手动 workflow_dispatch)
# 流程:checkout → 配置 SSH 密钥(Secret 注入) → 构建前后端镜像
# → 推送到本地 registry(156.233.226.46:5000)
# → 推送到本地 registry(127.0.0.1:5001)
# → SSH 到测试机(156.233.226.86) compose 拉起 → 健康检查
# 参考架构:homecentral deploy-test.yml
# =============================================================================
@@ -26,32 +27,37 @@ jobs:
with:
ref: master
- name: Setup SSH key (from secrets)
- name: Prepare tools and SSH key
run: |
mkdir -p ~/.ssh
printf '%s\n' "${{ secrets.PERLER_DEPLOY_KEY }}" > ~/.ssh/id_ed25519_deploy
export HOME=/root
mkdir -p ~/.ssh && chmod 700 ~/.ssh
# 钥匙来源:仓库 Secret DEPLOY_KEY(2026-11-06 由队长注入,不再依赖 runner 挂载)
printf '%s\n' "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_ed25519_deploy
chmod 600 ~/.ssh/id_ed25519_deploy
ssh-keyscan -H ${{ secrets.PERLER_DEPLOY_HOST }} >> ~/.ssh/known_hosts 2>/dev/null
ssh-keygen -lf ~/.ssh/id_ed25519_deploy
ssh-keyscan -p 48222 -H 156.233.226.86 >> ~/.ssh/known_hosts 2>/dev/null
echo "SSH 密钥就绪"
- name: Build images
run: |
set -e
docker build --build-arg VITE_CAPTCHA_SITE_KEY=6a062b70-c0b3-428e-8f1b-cca402e67ddd -t 156.233.226.46:5000/perler-lab-web:test ./perler-lab
docker build -t 156.233.226.46:5000/perler-lab-server:test ./perler-lab-server
docker build --build-arg VITE_CAPTCHA_SITE_KEY=6a062b70-c0b3-428e-8f1b-cca402e67ddd -t 127.0.0.1:5001/perler-lab-web:test ./perler-lab
docker build -t 127.0.0.1:5001/perler-lab-server:test ./perler-lab-server
docker images --format '{{.Repository}}:{{.Tag}} {{.Size}}' | grep perler-lab
- name: Push to registry (156.233.226.46:5000)
- name: Push to registry (127.0.0.1:5001)
run: |
set -e
docker push 156.233.226.46:5000/perler-lab-web:test
docker push 156.233.226.46:5000/perler-lab-server:test
docker push 127.0.0.1:5001/perler-lab-web:test
docker push 127.0.0.1:5001/perler-lab-server:test
- name: Deploy to test env (156.233.226.86)
run: |
set -e
HOST="${{ secrets.PERLER_DEPLOY_HOST }}"
SSH_CMD="ssh -i $HOME/.ssh/id_ed25519_deploy root@$HOST"
HOST="156.233.226.86"
SSH_PORT="48222"
SSH_CMD="ssh -i $HOME/.ssh/id_ed25519_deploy -o StrictHostKeyChecking=no -p $SSH_PORT root@$HOST"
SCP_CMD="scp -i $HOME/.ssh/id_ed25519_deploy -o StrictHostKeyChecking=no -P $SSH_PORT"
# 生成测试环境专用 compose(自带 PG,镜像来自 registry,数据卷持久化)
cat > /tmp/docker-compose.test.yml <<'COMPOSE_EOF'
@@ -69,7 +75,7 @@ jobs:
# 仅发布到测试机本机回环:供开发者 SSH 隧道连入本地 dev 使用,
# 不经过公网网卡,无安全组/DOCKER-USER 暴露问题
ports:
- "127.0.0.1:15432:5432"
- "127.0.0.1:15433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U perler -d perler_lab"]
interval: 5s
@@ -77,7 +83,7 @@ jobs:
retries: 12
networks: [perler-net]
server:
image: 156.233.226.46:5000/perler-lab-server:test
image: 127.0.0.1:5001/perler-lab-server:test
container_name: perler-lab-server
restart: unless-stopped
depends_on:
@@ -95,13 +101,13 @@ jobs:
- db-data:/app/data
networks: [perler-net, mw]
frontend:
image: 156.233.226.46:5000/perler-lab-web:test
image: 127.0.0.1:5001/perler-lab-web:test
container_name: perler-lab-frontend
restart: unless-stopped
environment:
CAPTCHA_UPSTREAM: "tianai-captcha:18200"
ports:
- "80:80"
- "8081:80"
depends_on:
- server
networks: [perler-net, mw]
@@ -115,7 +121,7 @@ jobs:
COMPOSE_EOF
$SSH_CMD 'mkdir -p /opt/perler-lab'
scp -i $HOME/.ssh/id_ed25519_deploy /tmp/docker-compose.test.yml root@$HOST:/opt/perler-lab/
$SCP_CMD /tmp/docker-compose.test.yml root@$HOST:/opt/perler-lab/
$SSH_CMD '
set -e
@@ -125,6 +131,8 @@ jobs:
if ! docker ps --format "{{.Names}}" | grep -q "^tianai-captcha$"; then
echo "警告: tianai-captcha 容器未运行(本地验证码平台栈未启动),验证码链路检查将失败"
fi
echo "===== 清理残留容器 ====="
docker rm -f perler-lab-pg perler-lab-server perler-lab-frontend 2>/dev/null || true
echo "===== 拉取镜像 ====="
docker compose -f docker-compose.test.yml pull
echo "===== 拉起容器 ====="
@@ -133,7 +141,7 @@ jobs:
echo "===== 等待前端健康 (/healthz) ====="
OK=0
for i in $(seq 1 24); do
if curl -sf http://127.0.0.1/healthz >/dev/null 2>&1; then OK=1; break; fi
if curl -sf http://127.0.0.1:8081/healthz >/dev/null 2>&1; then OK=1; break; fi
sleep 5
done
if [ "$OK" != "1" ]; then
@@ -158,7 +166,7 @@ jobs:
echo "===== 最终验证 ====="
HOK=0
for i in $(seq 1 12); do
CODE=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1/ || true)
CODE=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:8081/ || true)
[ "$CODE" = "200" ] && HOK=1 && break
sleep 5
done
@@ -170,7 +178,7 @@ jobs:
echo "===== 验证码链路检查(本地平台 TestEnv 站点) ====="
COK=0
for i in $(seq 1 6); do
CCODE=$(curl -s -m 8 -o /dev/null -w "%{http_code}" -X POST http://127.0.0.1/tac/api/challenge/generate -H "X-Site-Key: 6a062b70-c0b3-428e-8f1b-cca402e67ddd" -H "Content-Type: application/json" -d "{\"captchaType\":\"ROTATE\"}" || true)
CCODE=$(curl -s -m 8 -o /dev/null -w "%{http_code}" -X POST http://127.0.0.1:8081/tac/api/challenge/generate -H "X-Site-Key: 6a062b70-c0b3-428e-8f1b-cca402e67ddd" -H "Content-Type: application/json" -d "{\"captchaType\":\"ROTATE\"}" || true)
[ "$CCODE" = "200" ] && COK=1 && break
sleep 3
done
+3
View File
@@ -0,0 +1,3 @@
2026-09-23T06:38:31Z
2026-09-23T06:56:47Z
2026-09-23T06:58:49Z
+1 -1
View File
@@ -1,4 +1,4 @@
# Perler Lab 拼豆图纸库(组织协作版)
# Perler Lab 拼豆图纸库
图片转拼豆图纸工具:上传图片 → 参数面板 → 预览画布 → 备料清单 → PNG 下载,另有 AI 专区(分类选择/生成确认)、兑换码与订单权益体系。