Skip to content

Instantly share code, notes, and snippets.

@joaomilho
Created December 7, 2013 15:26
Show Gist options
  • Save joaomilho/7843852 to your computer and use it in GitHub Desktop.
Save joaomilho/7843852 to your computer and use it in GitHub Desktop.
boss.config
%%%
%%% 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, "/Users/maiz/open_source/ChicagoBoss-0.8.7"},
{applications, [chat]},
{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, 5432},
{db_adapter, pgsql},
{db_username, "chat"},
% {db_password, "boss"},
{db_database, "chat_dev"},
%% 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, "webmaster@example.com"},
% {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, 'master@example.com'},
%%%%%%%%%%%%%%%
%% 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, cowboy},
%%%%%%%%%%%%%%
%% 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
{ chat, [
{path, "../chat"},
{base_url, "/"},
% {domains, all},
{static_prefix, "/static"},
% {doc_prefix, "/doc"},
{dummy, true}
]}
].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment