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:
parent
0420b0acab
commit
7a469be7cd
|
|
@ -12,7 +12,11 @@ import { AdminAuthGuard } from './shared/guards/admin-auth.guard';
|
||||||
imports: [
|
imports: [
|
||||||
ConfigModule.forRoot({
|
ConfigModule.forRoot({
|
||||||
isGlobal: true,
|
isGlobal: true,
|
||||||
envFilePath: [`.env.${process.env.NODE_ENV || 'development'}`, '.env'],
|
envFilePath: [
|
||||||
|
`.env.${process.env.NODE_ENV || 'development'}`,
|
||||||
|
'.env',
|
||||||
|
'../.env', // 父目录共享 .env
|
||||||
|
],
|
||||||
}),
|
}),
|
||||||
InfrastructureModule,
|
InfrastructureModule,
|
||||||
ApplicationModule,
|
ApplicationModule,
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import { JwtAuthGuard } from './shared/guards/jwt-auth.guard';
|
||||||
envFilePath: [
|
envFilePath: [
|
||||||
`.env.${process.env.NODE_ENV || 'development'}`,
|
`.env.${process.env.NODE_ENV || 'development'}`,
|
||||||
'.env',
|
'.env',
|
||||||
|
'../.env', // 父目录共享 .env
|
||||||
],
|
],
|
||||||
ignoreEnvFile: false,
|
ignoreEnvFile: false,
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import { JwtAuthGuard } from './shared/guards/jwt-auth.guard';
|
||||||
envFilePath: [
|
envFilePath: [
|
||||||
`.env.${process.env.NODE_ENV || 'development'}`,
|
`.env.${process.env.NODE_ENV || 'development'}`,
|
||||||
'.env',
|
'.env',
|
||||||
|
'../.env', // 父目录共享 .env
|
||||||
],
|
],
|
||||||
ignoreEnvFile: false,
|
ignoreEnvFile: false,
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue