add option to pass CA certificate for database deploys

This commit is contained in:
Amruth Pillai
2022-03-04 11:50:10 +01:00
parent 5104ea6438
commit e1529e03f9
3 changed files with 3 additions and 0 deletions

View File

@ -6,4 +6,5 @@ export default registerAs('postgres', () => ({
username: process.env.POSTGRES_USERNAME,
password: process.env.POSTGRES_PASSWORD,
database: process.env.POSTGRES_DATABASE,
certificate: process.env.CA_CERT,
}));

View File

@ -17,6 +17,7 @@ import { User } from '@/users/entities/user.entity';
username: configService.get<string>('postgres.username'),
password: configService.get<string>('postgres.password'),
database: configService.get<string>('postgres.database'),
ssl: { ca: configService.get<string>('postgres.certtificate') },
synchronize: true,
entities: [User, Resume],
}),