fix(trading,auth): add parent .env path for shared JWT_SECRET
Both services need to read JWT_SECRET from the shared .env file in the parent directory (backend/services/.env). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
4440f40fba
commit
0420b0acab
|
|
@ -9,7 +9,7 @@ import { InfrastructureModule } from './infrastructure/infrastructure.module';
|
|||
// 配置模块
|
||||
ConfigModule.forRoot({
|
||||
isGlobal: true,
|
||||
envFilePath: ['.env.local', '.env'],
|
||||
envFilePath: ['.env.local', '.env', '../.env'],
|
||||
}),
|
||||
|
||||
// 限流模块
|
||||
|
|
|
|||
|
|
@ -13,7 +13,11 @@ import { JwtAuthGuard } from './shared/guards/jwt-auth.guard';
|
|||
imports: [
|
||||
ConfigModule.forRoot({
|
||||
isGlobal: true,
|
||||
envFilePath: [`.env.${process.env.NODE_ENV || 'development'}`, '.env'],
|
||||
envFilePath: [
|
||||
`.env.${process.env.NODE_ENV || 'development'}`,
|
||||
'.env',
|
||||
'../.env', // 父目录共享 .env
|
||||
],
|
||||
ignoreEnvFile: false,
|
||||
}),
|
||||
InfrastructureModule,
|
||||
|
|
|
|||
Loading…
Reference in New Issue