chore(deploy): add backend ECR deployment flow #1

Merged
qzl merged 24 commits from dev into main 2026-04-29 18:07:11 +08:00
Owner

Summary\n- Add production backend Docker build workflow for Gitea Actions.\n- Push backend image to AWS ECR with commit SHA and latest tags.\n- Add EC2 Docker Compose production deployment files and archive the Trellis CI/CD record.\n\n## Verification\n- docker compose --env-file ./deploy/.env -f deploy/docker-compose.prod.yml config\n- docker buildx build --provenance=false --load --file backend/Dockerfile --tag eryao-backend:commit-verify .\n- docker run smoke test: import app; print(app.app.title)\n- pre-commit hooks: backend ruff, basedpyright, pytest

## Summary\n- Add production backend Docker build workflow for Gitea Actions.\n- Push backend image to AWS ECR with commit SHA and latest tags.\n- Add EC2 Docker Compose production deployment files and archive the Trellis CI/CD record.\n\n## Verification\n- docker compose --env-file ./deploy/.env -f deploy/docker-compose.prod.yml config\n- docker buildx build --provenance=false --load --file backend/Dockerfile --tag eryao-backend:commit-verify .\n- docker run smoke test: import app; print(app.app.title)\n- pre-commit hooks: backend ruff, basedpyright, pytest
qzl added 24 commits 2026-04-29 18:05:32 +08:00
- Enable supabase in docker-compose.yml for local development
- Update llm_catalog.yaml with deepseek-v4-flash configuration
前端:
- 集成 in_app_purchase 插件,实现 IAP 支付流程
- 添加支付模块 (payments/) 处理产品获取、购买、验证
- 积分中心页面集成 Apple Pay 购买入口
- 设置页面重构: 关于/隐私/协议直接展示,删除 legal_center 子页面
- 修复欢迎引导页滚动检测阈值问题
- 修复解卦结果页 iOS 侧滑返回手势被阻止的问题
- 邀请码绑定按钮临时禁用(待后端实现)

后端:
- 新增 apple_iap_transactions 表记录交易
- 实现 Apple 服务器端验证 (App Store Server API)
- 支付成功后自动发放积分
- 支持 Sandbox/Production 环境切换
- 添加退款处理和交易状态机

协议:
- 更新积分流水协议,支持 purchase/refund 类型
- 新增 PAYMENT_* 错误码
- 新增系统语言/时区读取工具函数
- SessionStore 扩展支持时区存储
- 启动流程自动检测并保存系统语言/时区
- 注册时传递语言/时区到后端
- 登录后从服务器同步语言/时区
- 后端新增 GET /api/v1/points/ledger 接口
- 前端新增积分流水列表页面
- 积分中心添加「查看流水」入口
- 重命名 AccountDeleteScreen 为 AccountDataScreen
- 流水列表支持分页加载和空状态展示
- 后端 Schema 将 interface_language 和 ai_language 合并为 language
- 前端设置界面只保留一个语言选项
- AI 回复语言统一使用 language 设置
- 更新协议文档
- 新增数据库迁移脚本
- 通知静态配置支持 title/body i18n
- 前端通知列表和详情页展示本地化内容
- 新增数据库迁移脚本
- 更新通知协议文档
- 简化套餐配置结构,删除冗余的 default.yaml 和 us.yaml
- 优化 Apple IAP 服务和验证逻辑
- 更新套餐数据模型和协议文档
- 添加支付相关测试用例
- 更新占卜处理和结果页面
- 优化占卜共享组件
- 更新 App 主题配置
- 优化反馈页面
- 更新认证和通知测试用例
- 移除 router 中对 result.region、result.currency、pkg.price 的访问
- 修正 pkg.type.value 为 pkg.type (type 是 Literal 不是 Enum)
- 更新协议文档以反映实际实现
- 新增 Apple IAP 协议文档
- 标记未使用的错误码为 RESERVED
- 添加 .env.local 支持,app.sh 和 dev-migrate.sh 自动覆盖
- Docker Compose 使用 profiles 区分 dev/prod 环境
- 改进认证 dev session 判断逻辑,使用 test account 配置
- 修复 CoinPackageCard 重复代码问题
- 清理 opencode 配置,移除敏感信息
- 新增 infra/docker/README.md 文档
- 修复 ruff/pyright/flutter lint 错误
- 更新测试用例移除已删除的 country 字段
- 整合 18 个分散的 migration 文件为 5 个模块化文件
- settings.py 支持 .env.local 覆盖 .env
- 移除 user schema 中未使用的 country 字段正则
- 更新 profile protocol 文档移除 country 字段
- pyproject.toml 添加 ruff 到 dev 依赖
- 简化 integration test conftest 邮箱 fixture
- 添加 RunStatus.REFUSED 状态,AI可明确表达拒答意图
- 优化 System Prompt 使用视觉强调提高AI对拒答规则的遵守
- User Prompt 添加 SCOPE CHECK 和语言约束
- Worker Rules 添加多语言版本角色扮演规则
- Runner 传递 language 参数到 worker stage
- json_finalize 添加语言约束参数
- 更新单元测试匹配新的 prompt 结构
qzl merged commit a2ce6d8502 into main 2026-04-29 18:07:11 +08:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: qzl/eryao#1