From 34fc008f9d95ea98f35776ecce1dede2efb4e9c6 Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 7 Dec 2025 01:20:35 -0800 Subject: [PATCH] fix(blockchain-service): add global API prefix and increase healthcheck start_period MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add app.setGlobalPrefix('api/v1') to main.ts so health endpoint is at /api/v1/health consistent with other services - Increase healthcheck start_period to 60s to allow time for Prisma migrations on first startup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- backend/services/blockchain-service/src/main.ts | 4 ++++ backend/services/docker-compose.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/services/blockchain-service/src/main.ts b/backend/services/blockchain-service/src/main.ts index faf275c5..d5128271 100644 --- a/backend/services/blockchain-service/src/main.ts +++ b/backend/services/blockchain-service/src/main.ts @@ -24,6 +24,10 @@ async function bootstrap() { // CORS app.enableCors(); + // 全局 API 前缀 + const apiPrefix = configService.get('app.apiPrefix', 'api/v1'); + app.setGlobalPrefix(apiPrefix); + // Swagger 文档 const swaggerConfig = new DocumentBuilder() .setTitle('Blockchain Service API') diff --git a/backend/services/docker-compose.yml b/backend/services/docker-compose.yml index 15ca10cf..1f1a4266 100644 --- a/backend/services/docker-compose.yml +++ b/backend/services/docker-compose.yml @@ -572,7 +572,7 @@ services: interval: 30s timeout: 3s retries: 3 - start_period: 40s + start_period: 60s restart: unless-stopped networks: - rwa-network