-
Notifications
You must be signed in to change notification settings - Fork 3
/
ormconfig.js
51 lines (48 loc) · 1.29 KB
/
ormconfig.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
'use strict';
/* eslint-disable @typescript-eslint/no-var-requires */
require('dotenv').config();
const config = [
{
type: 'postgres',
name: 'backoffice',
host: process.env.BACKOFFICE_DB_HOST,
port: parseInt(process.env.BACKOFFICE_DB_PORT, 10),
username: process.env.BACKOFFICE_DB_USER,
password: process.env.BACKOFFICE_DB_PASSWORD,
database: process.env.BACKOFFICE_DB_DATABASE,
migrations: [
process.env.MIGRATIONS_PATH_FOR_BACKOFFICE
],
cli: {
migrationsDir: process.env.MIGRATIONS_PATH_FOR_BACKOFFICE
},
migrationsRun: true,
synchronize: true,
logging: true,
entities: [
process.env.ENTITIES_PATH_FOR_BACKOFFICE
]
},
{
type: 'postgres',
name: 'seeds-backoffice',
host: process.env.BACKOFFICE_DB_HOST,
port: parseInt(process.env.BACKOFFICE_DB_PORT, 10),
username: process.env.BACKOFFICE_DB_USER,
password: process.env.BACKOFFICE_DB_PASSWORD,
database: process.env.BACKOFFICE_DB_DATABASE,
migrations: [
process.env.SEEDS_PATH_FOR_BACKOFFICE
],
cli: {
migrationsDir: process.env.SEEDS_PATH_FOR_BACKOFFICE
},
migrationsRun: true,
synchronize: true,
logging: true,
entities: [
process.env.ENTITIES_PATH_FOR_BACKOFFICE
]
}
];
module.exports = config;