organization-svc.options contains undefined process.env.XXX variables because ConfigModule.forRoot() runs after this file (organization-svc.options.ts) will be injected
import { OrganizationsModule } from './organizations/organizations.module'
@Module({
imports: [
ConfigModule.forRoot(),
OrganizationsModule
]
})
It works in docker only because you defined env variables before the process starts
ConfigModule.forRoot() has to be called before all imports to read real data from .env file
organization-svc.options contains undefined process.env.XXX variables because ConfigModule.forRoot() runs after this file (organization-svc.options.ts) will be injected
It works in docker only because you defined env variables before the process starts
ConfigModule.forRoot() has to be called before all imports to read real data from .env file