@@ -20,23 +20,20 @@ const knownMailServices = [
20
20
options will have been handled prior to it being run.
21
21
*/
22
22
module . exports = {
23
- ip : {
24
- description : 'IP ghost should listen on' ,
25
- configPath : 'server.host' ,
26
- type : 'string'
27
- } ,
28
23
url : {
29
- description : 'Blog url protocol required ex http://loveghost.com ' ,
24
+ description : 'Blog URL with protocol E.g. http://loveghost.com' ,
30
25
validate : value => validator . isURL ( value , { require_protocol : true } ) ||
31
26
'Invalid URL. Your URL should include a protocol, E.g. http://my-ghost-blog.com' ,
32
- type : 'string'
27
+ type : 'string' ,
28
+ group : 'Ghost Options:'
33
29
} ,
34
30
adminUrl : {
35
- description : 'Url for the admin client, if different than the normal url ' ,
31
+ description : 'URL for the admin client, if different than the normal URL ' ,
36
32
configPath : 'admin.url' ,
37
33
validate : value => validator . isURL ( value , { require_protocol : true } ) ||
38
34
'Invalid URL. Your URL should include a protocol, E.g. http://my-ghost-blog.com' ,
39
- type : 'string'
35
+ type : 'string' ,
36
+ group : 'Ghost Options:'
40
37
} ,
41
38
port : {
42
39
description : 'Port ghost should listen on' ,
@@ -56,45 +53,55 @@ module.exports = {
56
53
let port = url . parse ( config . get ( 'url' ) ) . port || BASE_PORT ;
57
54
return portfinder . getPortPromise ( { port : parseInt ( port ) } ) ;
58
55
} ,
59
- type : 'number'
56
+ default : 2368 ,
57
+ type : 'number' ,
58
+ group : 'Ghost Options:'
60
59
} ,
61
- process : {
62
- description : 'Type of process manager to run Ghost with' ,
63
- defaultValue : ( c , env ) => env === 'production' ? 'systemd' : 'local' ,
64
- type : 'string'
60
+ ip : {
61
+ description : 'IP ghost should listen on' ,
62
+ configPath : 'server.host' ,
63
+ default : '127.0.0.1' ,
64
+ type : 'string' ,
65
+ group : 'Ghost Options:'
65
66
} ,
66
67
67
68
// Database options
68
69
db : {
69
- description : 'Type of database Ghost should use' ,
70
+ description : 'Type of database Ghost should use E.g. mysql or sqlite3 ' ,
70
71
validate : value => includes ( [ 'sqlite3' , 'mysql' ] , value ) ,
71
72
configPath : 'database.client' ,
72
- type : 'string'
73
+ type : 'string' ,
74
+ group : 'Database Options:'
73
75
} ,
74
76
dbpath : {
75
77
description : 'Path to the database file (sqlite3 only)' ,
76
78
configPath : 'database.connection.filename' ,
77
- type : 'string'
79
+ type : 'string' ,
80
+ group : 'Database Options:'
78
81
} ,
79
82
dbhost : {
80
83
description : 'Database host' ,
81
84
configPath : 'database.connection.host' ,
82
- type : 'string'
85
+ type : 'string' ,
86
+ group : 'Database Options:'
83
87
} ,
84
88
dbuser : {
85
89
description : 'Database username' ,
86
90
configPath : 'database.connection.user' ,
87
- type : 'string'
91
+ type : 'string' ,
92
+ group : 'Database Options:'
88
93
} ,
89
94
dbpass : {
90
95
description : 'Database password' ,
91
96
configPath : 'database.connection.password' ,
92
- type : 'string'
97
+ type : 'string' ,
98
+ group : 'Database Options:'
93
99
} ,
94
100
dbname : {
95
101
description : 'Database name' ,
96
102
configPath : 'database.connection.database' ,
97
- type : 'string'
103
+ type : 'string' ,
104
+ group : 'Database Options:'
98
105
} ,
99
106
100
107
// Mail options:
@@ -104,37 +111,44 @@ module.exports = {
104
111
validate : value => includes ( [ 'SMTP' , 'Sendmail' , 'Direct' ] , value ) ,
105
112
configPath : 'mail.transport' ,
106
113
type : 'string' ,
107
- default : 'Direct'
114
+ default : 'Direct' ,
115
+ group : 'Mail Options:'
108
116
} ,
109
117
mailservice : {
110
118
description : 'Mail service (used with SMTP transport), E.g. Mailgun, Sendgrid, Gmail, SES...' ,
111
119
configPath : 'mail.options.service' ,
112
120
validate : value => includes ( knownMailServices , value ) ,
113
- type : 'string'
121
+ type : 'string' ,
122
+ group : 'Mail Options:'
114
123
} ,
115
124
mailuser : {
116
125
description : 'Mail auth user (used with SMTP transport)' ,
117
126
configPath : 'mail.options.auth.user' ,
118
127
type : 'string' ,
119
- implies : 'mailpass'
128
+ implies : 'mailpass' ,
129
+ group : 'Mail Options:'
120
130
} ,
121
131
mailpass : {
122
132
description : 'Mail auth pass (used with SMTP transport)' ,
123
133
configPath : 'mail.options.auth.pass' ,
124
134
type : 'string' ,
125
- implies : 'mailuser'
135
+ implies : 'mailuser' ,
136
+ group : 'Mail Options:'
126
137
} ,
127
138
mailhost : {
128
139
description : 'Mail host (used with SMTP transport)' ,
129
140
configPath : 'mail.options.host' ,
130
- type : 'string'
141
+ type : 'string' ,
142
+ group : 'Mail Options:'
131
143
} ,
132
144
mailport : {
133
145
description : 'Mail port (used with SMTP transport)' ,
134
146
configPath : 'mail.options.port' ,
135
- type : 'number'
147
+ type : 'number' ,
148
+ group : 'Mail Options:'
136
149
} ,
137
150
151
+ // Log options
138
152
log : {
139
153
description : 'Transport to send Ghost log output to' ,
140
154
configPath : 'logging.transports' ,
@@ -143,6 +157,15 @@ module.exports = {
143
157
return transports ;
144
158
} ,
145
159
default : [ 'file' , 'stdout' ] , // used for config command handling
146
- type : 'array'
160
+ type : 'array' ,
161
+ group : 'Ghost Options:'
162
+ } ,
163
+
164
+ // Customise how Ghost-CLI runs
165
+ process : {
166
+ description : 'Type of process manager to run Ghost with' ,
167
+ defaultValue : ( c , env ) => env === 'production' ? 'systemd' : 'local' ,
168
+ type : 'string' ,
169
+ group : 'Service Options:'
147
170
}
148
171
} ;
0 commit comments