fix(mining-*): add parent .env path for shared config

All mining services need to read shared environment variables
(JWT_SECRET, DATABASE_URL, etc.) from backend/services/.env

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-15 06:58:56 -08:00
parent 0420b0acab
commit 7a469be7cd
3 changed files with 7 additions and 1 deletions

View File

@ -12,7 +12,11 @@ import { AdminAuthGuard } from './shared/guards/admin-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
],
}),
InfrastructureModule,
ApplicationModule,

View File

@ -16,6 +16,7 @@ import { JwtAuthGuard } from './shared/guards/jwt-auth.guard';
envFilePath: [
`.env.${process.env.NODE_ENV || 'development'}`,
'.env',
'../.env', // 父目录共享 .env
],
ignoreEnvFile: false,
}),

View File

@ -16,6 +16,7 @@ import { JwtAuthGuard } from './shared/guards/jwt-auth.guard';
envFilePath: [
`.env.${process.env.NODE_ENV || 'development'}`,
'.env',
'../.env', // 父目录共享 .env
],
ignoreEnvFile: false,
}),