mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
Transfer repository from Gitlab
This commit is contained in:
parent
af2efbdbbd
commit
568cc243f0
177 changed files with 13300 additions and 0 deletions
27
server/src/config/database.config.ts
Normal file
27
server/src/config/database.config.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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,
|
||||
// },
|
||||
// },
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue