Skip to content

Commit 3114d87

Browse files
committed
Update for support of Ghost 0.11.0
1 parent 01d3d31 commit 3114d87

File tree

6 files changed

+406
-234
lines changed

6 files changed

+406
-234
lines changed

files/config.js

Lines changed: 117 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var path = require('path'),
66

77
// Modifications for BlueMix compatibility
88
var postCreds;
9+
var cloudantCreds;
910
var bluemixport = (process.env.VCAP_APP_PORT || '2368');
1011
var bluemixhost = (process.env.VCAP_APP_HOST || '127.0.0.1');
1112
var yaml = require('js-yaml');
@@ -33,6 +34,10 @@ if (process.env.VCAP_SERVICES) {
3334
postCreds = services[svcName][0]['credentials'];
3435
postCreds.client = 'mysql';
3536
postCreds.filename = '';
37+
} else if (svcName.match(/^cloudantNoSQLDB/)) {
38+
cloudantCreds = services[svcName][0]['credentials'];
39+
cloudantCreds.client = 'cloudant';
40+
cloudantCreds.filename = '';
3641
}
3742
}
3843
} else {
@@ -52,10 +57,16 @@ config = {
5257
// ### Development **(default)**
5358
development: {
5459
// The url to use when providing links to the site, E.g. in RSS and email.
55-
url: 'http://my_app_name.ng.bluemix.net',
60+
// Change this to your Ghost blog's published URL.
61+
url: 'http://localhost:2368',
62+
63+
// Example refferer policy
64+
// Visit https://www.w3.org/TR/referrer-policy/ for instructions
65+
// default 'origin-when-cross-origin',
66+
// referrerPolicy: 'origin-when-cross-origin',
5667

5768
// Example mail config
58-
// Visit http://docs.ghost.org/mail for instructions
69+
// Visit http://support.ghost.org/mail for instructions
5970
// ```
6071
// mail: {
6172
// transport: 'SMTP',
@@ -69,18 +80,27 @@ config = {
6980
// },
7081
// ```
7182

83+
// #### Database
84+
// Ghost supports sqlite3 (default), MySQL & PostgreSQL
7285
database: {
7386
client: 'sqlite3',
7487
connection: {
7588
filename: path.join(__dirname, '/content/data/ghost-dev.db')
7689
},
7790
debug: false
7891
},
92+
// #### Server
93+
// Can be host & port (default), or socket
7994
server: {
8095
// Host to be passed to node's `net.Server#listen()`
8196
host: '127.0.0.1',
8297
// Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`
8398
port: '2368'
99+
},
100+
// #### Paths
101+
// Specify where your content directory lives
102+
paths: {
103+
contentPath: path.join(__dirname, '/content/')
84104
}
85105
},
86106

@@ -90,7 +110,7 @@ config = {
90110
production: {
91111
// URL constructed from data within the manifest.yml file.
92112
url: appurl,
93-
113+
94114
// Example mail config
95115
// Visit http://docs.ghost.org/mail for instructions
96116
// ```
@@ -105,7 +125,7 @@ config = {
105125
// }
106126
// },
107127
// ```
108-
128+
109129
database: {
110130
client: postCreds.client,
111131
connection: {
@@ -124,7 +144,100 @@ config = {
124144
host: bluemixhost,
125145
// Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`
126146
port: bluemixport
147+
},
148+
storage: {
149+
active: 'cloudant',
150+
'cloudant': {
151+
host: cloudantCreds.host,
152+
password: cloudantCreds.password,
153+
port: cloudantCreds.port,
154+
url: cloudantCreds.url,
155+
username: cloudantCreds.username
156+
}
157+
},
158+
mail: {
159+
transport: 'SMTP',
160+
from: '"Bluemix Ghost Blogger" <[email protected]>',
161+
options: {
162+
service: 'Gmail',
163+
auth: {
164+
// http://support.ghost.org/mail/
165+
// https://accounts.google.com/SignUp
166+
167+
pass: 'newpassword'
168+
}
169+
}
127170
}
171+
},
172+
// **Developers only need to edit below here**
173+
174+
// ### Testing
175+
// Used when developing Ghost to run tests and check the health of Ghost
176+
// Uses a different port number
177+
testing: {
178+
url: 'http://127.0.0.1:2369',
179+
database: {
180+
client: 'sqlite3',
181+
connection: {
182+
filename: path.join(__dirname, '/content/data/ghost-test.db')
183+
},
184+
pool: {
185+
afterCreate: function (conn, done) {
186+
conn.run('PRAGMA synchronous=OFF;' +
187+
'PRAGMA journal_mode=MEMORY;' +
188+
'PRAGMA locking_mode=EXCLUSIVE;' +
189+
'BEGIN EXCLUSIVE; COMMIT;', done);
190+
}
191+
},
192+
useNullAsDefault: true
193+
},
194+
server: {
195+
host: '127.0.0.1',
196+
port: '2369'
197+
},
198+
logging: false
199+
},
200+
201+
// ### Testing MySQL
202+
// Used by Travis - Automated testing run through GitHub
203+
'testing-mysql': {
204+
url: 'http://127.0.0.1:2369',
205+
database: {
206+
client: 'mysql',
207+
connection: {
208+
host : '127.0.0.1',
209+
user : 'root',
210+
password : '',
211+
database : 'ghost_testing',
212+
charset : 'utf8'
213+
}
214+
},
215+
server: {
216+
host: '127.0.0.1',
217+
port: '2369'
218+
},
219+
logging: false
220+
},
221+
222+
// ### Testing pg
223+
// Used by Travis - Automated testing run through GitHub
224+
'testing-pg': {
225+
url: 'http://127.0.0.1:2369',
226+
database: {
227+
client: 'pg',
228+
connection: {
229+
host : '127.0.0.1',
230+
user : 'postgres',
231+
password : '',
232+
database : 'ghost_testing',
233+
charset : 'utf8'
234+
}
235+
},
236+
server: {
237+
host: '127.0.0.1',
238+
port: '2369'
239+
},
240+
logging: false
128241
}
129242
};
130243

0 commit comments

Comments
 (0)