-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathknexfile.js
45 lines (44 loc) · 1.02 KB
/
knexfile.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
require('dotenv').config();
const path = require('path');
const BASE_PATH = path.join(__dirname, 'db');
module.exports = {
test: {
client: 'pg',
connection: {
host: process.env.POSTGRES_HOST || '0.0.0.0',
port: process.env.POSTGRES_PORT || '5432',
user: process.env.POSTGRES_USER || 'postgres',
password: process.env.POSTGRES_PASSWORD || 'postgres',
database: process.env.POSTGRES_DB || 'diagrams',
},
pool: {
min: 0,
max: 50,
},
migrations: {
directory: path.join(BASE_PATH, 'migrations'),
},
seeds: {
directory: path.join(BASE_PATH, 'seeds'),
},
},
docker: {
client: 'pg',
connection: {
host: 'diagrams_db',
user: 'postgres',
password: process.env.POSTGRES_PASSWORD || 'postgres',
database: 'diagrams',
},
pool: {
min: 0,
max: 50,
},
migrations: {
directory: path.join(BASE_PATH, 'migrations'),
},
seeds: {
directory: path.join(BASE_PATH, 'seeds'),
},
},
};