mirror of
https://github.com/immich-app/immich.git
synced 2025-01-07 20:36:48 +01:00
28 lines
659 B
TypeScript
28 lines
659 B
TypeScript
|
import { TypeOrmModuleOptions } from '@nestjs/typeorm';
|
||
|
import dotenv from 'dotenv';
|
||
|
|
||
|
const result = dotenv.config();
|
||
|
|
||
|
if (result.error) {
|
||
|
console.log(result.error);
|
||
|
}
|
||
|
|
||
|
export const databaseConfig: TypeOrmModuleOptions = {
|
||
|
type: 'postgres',
|
||
|
host: process.env.DB_HOST,
|
||
|
port: 5432,
|
||
|
username: process.env.DB_USERNAME,
|
||
|
password: process.env.DB_PASSWORD,
|
||
|
database: process.env.DB_DATABASE,
|
||
|
entities: [__dirname + '/../**/*.entity.{js,ts}'],
|
||
|
synchronize: true,
|
||
|
// logging: true,
|
||
|
// logger: 'advanced-console',
|
||
|
// ssl: process.env.NODE_ENV == 'production',
|
||
|
// extra: {
|
||
|
// ssl: {
|
||
|
// rejectUnauthorized: false,
|
||
|
// },
|
||
|
// },
|
||
|
};
|