fix(databasemodule): make ssl optional, pass ca cert as base64 env

This commit is contained in:
Amruth Pillai
2022-03-07 15:06:16 +01:00
parent cff51a8be9
commit c738f311da
5 changed files with 16 additions and 7 deletions

View File

@ -19,6 +19,9 @@ import { User } from '@/users/entities/user.entity';
database: configService.get<string>('postgres.database'),
synchronize: true,
entities: [User, Resume],
ssl: configService.get<string>('postgres.certificate') && {
ca: Buffer.from(configService.get<string>('postgres.certificate'), 'base64').toString('ascii'),
},
}),
}),
],