-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
90 lines (83 loc) · 1.98 KB
/
config.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Ghost Configuration for Heroku
var path = require('path'),
config,
fileStorage,
storage;
if (!!process.env.S3_ACCESS_KEY_ID) {
fileStorage = true
storage = {
active: 'ghost-s3',
'ghost-s3': {
accessKeyId: process.env.S3_ACCESS_KEY_ID,
secretAccessKey: process.env.S3_ACCESS_SECRET_KEY,
bucket: process.env.S3_BUCKET_NAME,
region: process.env.S3_BUCKET_REGION,
assetHost: process.env.S3_ASSET_HOST_URL
}
}
} else if (!!process.env.BUCKETEER_AWS_ACCESS_KEY_ID) {
fileStorage = true
storage = {
active: 'ghost-s3',
'ghost-s3': {
accessKeyId: process.env.BUCKETEER_AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.BUCKETEER_AWS_SECRET_ACCESS_KEY,
bucket: process.env.BUCKETEER_BUCKET_NAME,
region: process.env.S3_BUCKET_REGION,
assetHost: process.env.S3_ASSET_HOST_URL
}
}
} else {
fileStorage = false
storage = {}
}
config = {
// Production (Heroku)
production: {
url: process.env.HEROKU_URL,
mail: {
transport: 'SMTP',
options: {
service: 'Mailgun',
auth: {
user: process.env.MAILGUN_SMTP_LOGIN,
pass: process.env.MAILGUN_SMTP_PASSWORD
}
}
},
fileStorage: fileStorage,
storage: storage,
database: {
client: 'postgres',
connection: process.env.DATABASE_URL,
debug: false
},
server: {
host: '0.0.0.0',
port: process.env.PORT
},
paths: {
contentPath: path.join(__dirname, '/content/')
}
},
// Development
development: {
url: 'http://localhost:2368',
database: {
client: 'sqlite3',
connection: {
filename: path.join(__dirname, '/content/data/ghost-dev.db')
},
debug: false
},
server: {
host: '127.0.0.1',
port: '2368'
},
paths: {
contentPath: path.join(__dirname, '/content/')
}
}
};
// Export config
module.exports = config;