fix(docker): 移除 authorization-service 对 reward-service 的启动依赖

避免循环依赖:authorization-service <-> reward-service
使用 fallback 机制处理服务暂时不可用的情况(与 referral-service 类似)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-23 05:17:35 -08:00
parent 16a3e76588
commit 6572ef22c5
2 changed files with 4 additions and 4 deletions

View File

@ -679,6 +679,7 @@ services:
IDENTITY_SERVICE_ENABLED: "true"
REWARD_SERVICE_URL: http://reward-service:3005
REWARD_SERVICE_ENABLED: "true"
# 注意:不添加 reward-service 依赖,避免循环依赖
depends_on:
postgres:
condition: service_healthy
@ -686,8 +687,6 @@ services:
condition: service_healthy
kafka:
condition: service_healthy
reward-service:
condition: service_healthy
networks:
- rwa-network

View File

@ -502,6 +502,9 @@ services:
# Reward Service - 用于获取月度收益数据
- REWARD_SERVICE_URL=http://rwa-reward-service:3005
- REWARD_SERVICE_ENABLED=true
# 注意:不添加 reward-service 依赖,避免循环依赖
# authorization-service <-> reward-service 互相调用
# 使用 fallback 机制处理服务暂时不可用的情况
depends_on:
postgres:
condition: service_healthy
@ -513,8 +516,6 @@ services:
condition: service_healthy
identity-service:
condition: service_healthy
reward-service:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3009/api/v1/health"]
interval: 30s