Commit Graph

14 Commits

Author SHA1 Message Date
hailin 92850d8c62 chore(deploy): 添加 blockchain-service 到部署脚本
- health 检查列表添加 blockchain-service
- migrate 服务列表添加 blockchain-service
- 帮助文档更新服务列表

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 00:32:23 -08:00
hailin 71e805b1fd feat(deploy): 添加 HOT_WALLET 配置到 install 模板
在 deploy.sh 的 install() 函数中添加热钱包配置,
新部署时会自动包含这些环境变量。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 09:06:51 -08:00
hailin 54d3533c18 feat(services): add infra-clean and infra-reset commands
- infra-clean: Remove infrastructure containers and volumes (DELETES DATA)
- infra-reset: Clean and reinstall infrastructure (DELETES DATA)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 08:56:36 -08:00
hailin bfddd203ca feat(services): add --no-cache option to rebuild-svc command
Usage: ./deploy.sh rebuild-svc <name> --no-cache

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 08:46:00 -08:00
hailin fdb3c132de feat(services): add infrastructure management commands to deploy.sh
Add commands for managing infrastructure services separately:
- infra-up: Start postgres, redis, zookeeper, kafka
- infra-down: Stop infrastructure services
- infra-restart: Restart infrastructure
- infra-status: Show infrastructure status with health checks
- infra-logs: View infrastructure service logs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 08:32:30 -08:00
hailin dba9d16074 . 2025-12-07 00:40:19 -08:00
hailin 747e4ae8ef refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing
- Remove Address field from PartyEndpoint (parties connect to router themselves)
- Update K8s Discovery to only manage PartyID and Role labels
- Add Party registration and SessionEvent protobuf definitions
- Implement PartyRegistry and SessionEventBroadcaster domain logic
- Add RegisterParty and SubscribeSessionEvents gRPC handlers
- Prepare infrastructure for party-driven MPC coordination

This is the first phase of migrating from coordinator-driven to party-driven
architecture following international MPC system design patterns.
2025-12-05 08:11:28 -08:00
Developer 8850ea6ab0 fix(mpc-service): 重构数据库迁移机制,从根本解决表不存在问题
问题分析:
- 旧迁移文件只有 party_shares 表,缺少 session_states 和 share_backups 表
- Prisma 的 _prisma_migrations 表记录迁移已完成,导致新表无法创建
- 迁移状态与实际数据库不一致

解决方案:
1. 删除旧迁移目录,创建全新的 0001_init 迁移
2. 新迁移包含所有三个表: party_shares, session_states, share_backups
3. 添加 docker-entrypoint.sh 启动脚本,容器启动时自动运行迁移
4. 修改 Dockerfile 使用 entrypoint 脚本

deploy.sh 新增命令:
- migrate-reset: 重置数据库并重新运行迁移
- migrate-push: 强制同步 schema (创建缺失的表)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 21:47:42 -08:00
Developer 08541f1d8d fix(mpc): 修复 MPC 服务连接配置
问题: mpc-service 无法连接到 mpc-session-coordinator,超时 30 秒

修复:
1. mpc-system/docker-compose.yml:
   - session-coordinator 暴露端口 8081:8080
   - message-router 暴露端口 8082:8080

2. services/docker-compose.yml:
   - MPC_COORDINATOR_URL: 192.168.1.100 -> 192.168.1.111
   - MPC_MESSAGE_ROUTER_WS_URL: 192.168.1.100 -> 192.168.1.111

3. 同步更新 .env.example 和 deploy.sh

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 20:39:53 -08:00
Developer 46379afd18 fix(deploy): 添加 admin-service 数据库 rwa_admin
- 在 init-databases.sh 中添加 rwa_admin 数据库
- 在 migrate 函数中添加 admin-service

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 22:57:55 -08:00
Developer e03b9eb7c9 feat(deploy): 添加 presence-service 到主部署脚本
- 在 init-databases.sh 中添加 rwa_presence 数据库
- 在 migrate 函数中添加 presence-service

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 22:56:15 -08:00
Developer 784e98f1dc fix(deploy): 修复 health 命令使用正确的健康检查端点
- 为每个微服务配置实际的健康检查端点路径
- 大多数服务使用 /api/v1/health
- backup-service 和 reward-service 使用 /health
- leaderboard-service 使用 /api/health
- 新增 presence-service (端口 3011)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 22:46:52 -08:00
Developer 0a0b7eb886 feat(services): add individual deploy scripts for each service
Add deploy.sh script to each service directory for independent
deployment and management:
- identity-service, wallet-service, backup-service
- planting-service, referral-service, reward-service
- mpc-service, leaderboard-service, reporting-service
- authorization-service

Each script supports:
- build / build-no-cache
- start / stop / restart
- logs / logs-tail
- status / health
- migrate / shell

Also updated main deploy.sh with build-no-cache command.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 03:36:50 -08:00
Developer f99cac21cf feat(services): add unified Docker deployment system
- Add docker-compose.yml for all 11 backend services
- Add deploy.sh automation script with install/build/up/down commands
- Add init-databases.sh for PostgreSQL multi-database initialization
- Add .env.example template with secure key placeholders
- Fix empty Dockerfiles for admin/referral/reporting/wallet services

Services included:
- identity-service (:3000)
- wallet-service (:3001)
- backup-service (:3002)
- planting-service (:3003)
- referral-service (:3004)
- reward-service (:3005)
- mpc-service (:3006)
- leaderboard-service (:3007)
- reporting-service (:3008)
- authorization-service (:3009)
- admin-service (:3010)

Infrastructure: PostgreSQL, Redis, Kafka/Zookeeper

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 02:12:49 -08:00