-
Notifications
You must be signed in to change notification settings - Fork 1
/
boss.config
274 lines (224 loc) · 8.06 KB
/
boss.config
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
%%%
%%% CHICAGO BOSS PROJECT SKELETON
%%%
%%% This file can be modified by you to avoid you needing to reenter
%%% defaults when creating new projects. For full configuration
%%% details, please visit
%%% https://github.com/evanmiller/ChicagoBoss/wiki/Configuration
%%% When running tests, you may want to create a separate configuration file
%%% "boss.test.config" which, if present, will be read instead of boss.config.
[{boss, [
{path, "/boss/ChicagoBoss-0.8.7"},
{applications, [cb_tutorial]},
{assume_locale, "en"},
%%%%%%%%%%%%
%% System %%
%%%%%%%%%%%%
%% vm_cookie - Erlang cookie, must be the same for all nodes in the
%% cluster.
%% vm_name - Node name to use in production. Must be unique for all
%% nodes in the cluster. Defaults to <application_name>@<host_name>.
%% vm_max_processes - The limit of processes that the VM is allowed to
%% spawn. Defaults to 32768 (the usual system default).
% {vm_cookie, "secret"},
% {vm_name, "leader"},
% {vm_max_processes, 32768},
%%%%%%%%%%%%%%
%% Compiler %%
%%%%%%%%%%%%%%
%% See compile(3) for a full list of options
% {compiler_options, [return_errors]},
%%%%%%%%%%%
%% Cache %%
%%%%%%%%%%%
%% cache_adapter - Which cache adapter to use. Currently the only
%% valid value is memcached_bin.
%% cache_enable - Whether to enable the cache. Defaults to false.
%% cache_servers - A list of cache servers ({Host, Port,
%% PoolSize}). Defaults to [{"localhost", 11211, 1}].
%% cache_exp_time- The maximum time to keep a cache entry, in
%% seconds. Defaults to 60.
% {cache_adapter, memcached_bin},
% {cache_enable, false},
% {cache_servers, [{"localhost", 11211, 1}]},
% {cache_exp_time, 60},
%%%%%%%%%%%%%%
%% Database %%
%%%%%%%%%%%%%%
%% db_host - The hostname of the database. Defaults to "localhost".
%% db_port - The port of the database. Defaults to 1978.
%% db_adapter - The database adapter to use. Valid values are:
%% mock - In-memory (non-persistent) database, useful for testing
%% mnesia - Mnesia
%% mongodb- MongoDB
%% mysql - MySQL
%% pgsql - PostgreSQL
%% riak - Riak
%% tyrant - Tokyo Tyrant
%% db_username - The username used for connecting to the database (if
%% needed).
%% db_password - The password used for connecting to the database (if
%% needed).
%% db_database - The name of the database to connect to (if needed).
%% db_cache_enable - Whether to enable the cache in boss_db. Defaults
%% to false. Requires cache_enable to be set to true.
{db_host, "localhost"},
{db_port, 1978},
{db_adapter, mock},
% {db_username, "boss"},
% {db_password, "boss"},
% {db_database, "boss"},
%% MongoDB only
%%
%% Read https://github.com/TonyGen/mongodb-erlang#readme for details
%% db_write_mode - defaults to safe
%% db_read_mode - defaults to master
% {db_write_mode, safe},
% {db_read_mode, master},
%% Database sharding
%% A list of proplists with per-shard database configuration.
%% The proplists override the above options, and should contain two
%% additional options:
%% {db_shards, [
%% [
%% {db_host, "localhost"},
%% {db_adapter, mysql},
%% {db_port, 3306},
%% {db_username, "dbuser"},
%% {db_password, "dbpass"},
%% {db_database, "database"},
%% {db_shard_id, shard_id_atom},
%% {db_shard_models, [model_atom_1, model_atom_2,
%% model_atom_3, etc]}
%% ]
%% ]},
%%%%%%%%%%
%% Mail %%
%%%%%%%%%%
%% mail_driver - The email delivery driver to use. Valid values are:
%% boss_mail_driver_smtp - SMTP delivery. If mail_relay is present,
%% it is used as a relay, otherwise direct delivery is attempted.
%% boss_mail_driver_mock - A black hole, useful for testing.
%% mail_relay_host - The relay server for SMTP mail deliveries.
%% mail_relay_username -The username used for connecting to the SMTP
%% relay (if needed).
%% mail_relay_password -The password used for connecting to the SMTP
%% relay (if needed).
% {mail_driver, boss_mail_driver_mock},
% {mail_relay_host, "smtp.example.com"},
% {mail_relay_username, "[email protected]"},
% {mail_relay_password, "mailpassword"},
%%%%%%%%%%%%%%%%%%
%% Master Node %%
%%%%%%%%%%%%%%%%%%
%% master_node -
%% For distributed configurations, the name of the master node.
%% The master node runs global services (incoming mail, message
%% queue, events, sessions).
%% Should be an atom, e.g. somenode@somehost.
%% The node name is specified in the -sname or -name argument in the
%% startup script.
% {master_node, '[email protected]'},
%%%%%%%%%%%%%%%
%% Webserver %%
%%%%%%%%%%%%%%%
%% port - The port to run the server on. Defaults to 8001.
%% server - The HTTP server to use. Valid values are:
%% mochiweb - The Mochiweb Web Server
%% misultin - The Misultin Web Server (deprecated)
%% cowboy - The Cowboy Web Server (Comet, WebSockets, highly scalable, ...)
{port, 8001},
{server, mochiweb},
%%%%%%%%%%%%%%
%% Sessions %%
%%%%%%%%%%%%%%
%% session_adapter - Selects the session driver to use. Valid values:
%% cache - Store sessions in the configured cache
%% servers. Requires cache_enable to be set to true.
%% ets (default)
%% mnesia
%% session_enable - Whether to enable sessions. Defaults to true.
%% session_key - Cookie key for sessions. Defaults to "_boss_session".
%% session_exp_time - Expiration time in seconds for the session
%% cookie. Defaults to 525600, i.e. 6 days, 2 hours.
%% session_mnesia_nodes, for {session_adapter, mnesia} only - List of
%% Mnesia nodes, defaults to node().
%% session_domain - (optional, sets the Domain=x cookie option),
%% this can be used by ex: to enable subdomain apps
%% (*.domain.com) with the param ".domain.com" => {session_domain,
%% ".domain.com"}
{session_adapter, mock},
{session_key, "_boss_session"},
{session_exp_time, 525600},
% {session_enable, true},
% {session_mnesia_nodes, [node()]}, % <- replace "node()" with a node name
% {session_domain, ".domain.com"},
%%%%%%%%%%%%%%%
%% Templates %%
%%%%%%%%%%%%%%%
%% template_tag_modules - List of external modules to search for
%% custom ErlyDTL tags.
%% template_filter_modules - List of external modules to search for
%% custom ErlyDTL filters.
{template_tag_modules, []},
{template_filter_modules, []},
%%%%%%%%%%%%%%%%%%%%%
%% Incoming Emails %%
%%%%%%%%%%%%%%%%%%%%%
%% smtp_server_enable - Enable the SMTP server for incoming mail
%% smtp_server_address - The address that the SMTP server should bind
%% to. Defaults to {0, 0, 0, 0} (all interfaces).
%% smtp_server_domain - The host name of the SMTP server
%% smtp_server_port - The port that the SMTP server should listen
%% on. Defaults to 25.
% {smtp_server_enable, false},
% {smtp_server_address, {0, 0, 0, 0}},
% {smtp_server_domain, "smtp.example.com"},
% {smtp_server_port, 25},
%% smtp_server_protocol - The protocol that the SMTP server should
%% use. Valid values are:
%% tcp (default)
%% ssl
% {smtp_server_protocol, tcp},
%%%%%%%%%
%% SSL %%
%%%%%%%%%
%% ssl_enable - Enable HTTP over SSL
%% ssl_options - SSL options; see ssl(3erl)
% {ssl_enable, true},
% {ssl_options, []},
{dummy, true} % a final dummy option so we don't have to keep track of commas
]},
%% MESSAGE QUEUE
{ tinymq, [
%% max_age- Maximum age of messages in the [message queue], in
%% seconds. Defaults to 60.
% {max_age, 60}
]},
%%%%%%%%%%%%%
%% Logging %%
%%%%%%%%%%%%%
%% Lager default config.
%% More info: https://github.com/basho/lager
{lager, [
{handlers, [
{lager_console_backend, info},
{lager_file_backend, [
{"log/error.log", error, 10485760, "$D0", 5},
{"log/console.log", info, 10485760, "$D0", 5}
]}
]}
]},
%% APPLICATION CONFIGURATIONS
%% domains - A list of domains to serve the application on
%% static_prefix - The URL prefix of static assets
%% doc_prefix - The URL prefix for developer documentation
{ cb_tutorial, [
{path, "../cb_tutorial"},
{base_url, "/"},
% {domains, all},
% {static_prefix, "/static"},
% {doc_prefix, "/doc"},
{dummy, true}
]}
].