url-shortener/config/sys.config

96 lines
3.3 KiB
Plaintext
Raw Normal View History

2017-11-30 17:09:48 +00:00
[
2017-11-30 17:09:48 +00:00
{scoper, [
{storage, scoper_storage_logger}
]},
2017-11-30 17:09:48 +00:00
{shortener, [
2017-12-18 14:49:39 +00:00
{space_size , 8},
2017-12-14 15:16:48 +00:00
{hash_algorithm , sha256},
{api, #{
ip => "::",
port => 8080,
authorizer => #{
keyset => #{}
},
short_url_template => #{
scheme => https,
2017-12-18 14:49:39 +00:00
netloc => "rbk.mn",
2017-12-14 15:16:48 +00:00
path => "/"
},
source_url_whitelist => [
"https://*"
]
2017-12-14 15:16:48 +00:00
}},
{processor, #{
ip => "::",
port => 8022,
protocol_opts => #{
request_timeout => 60000
}
}},
{service_clients, #{
automaton => #{
url => <<"http://machinegun:8022/v1/automaton">>,
retries => #{
% function => retry strategy
% '_' work as "any"
% default value is 'finish'
% for more info look genlib_retry :: strategy()
% https://github.com/rbkmoney/genlib/blob/master/src/genlib_retry.erl#L19
'Start' => {linear, 3, 1000},
'GetMachine' => {linear, 3, 1000},
'Remove' => {linear, 3, 1000},
'_' => finish
}
}
2018-04-13 11:21:06 +00:00
}},
{health_checkers, [
{erl_health, disk , ["/", 99] },
{erl_health, cg_memory, [99] },
{erl_health, service , [<<"shortener">>]}
]}
2019-04-04 16:01:50 +00:00
]},
{kernel, [
{logger_level, info},
{logger, [
{handler, default, logger_std_h, #{
level => error,
config => #{
type => standard_error
},
formatter => {logger_formatter, #{
depth => 30
}}
}},
{handler, console_logger, logger_std_h, #{
level => debug,
config => #{
type => {file, "/var/log/shortener/console.json"},
sync_mode_qlen => 20,
burst_limit_enable => true,
burst_limit_max_count => 600,
burst_limit_window_time => 1000
},
filters => [{access_log, {fun logger_filters:domain/2, {stop, equal, [cowboy_access_log]}}}],
formatter => {logger_logstash_formatter, #{}}
}},
{handler, access_logger, logger_std_h, #{
level => info,
config => #{
type => {file, "/var/log/shortener/access_log.json"},
sync_mode_qlen => 20,
burst_limit_enable => true,
burst_limit_max_count => 600,
burst_limit_window_time => 1000
},
filters => [{access_log, {fun logger_filters:domain/2, {stop, not_equal, [cowboy_access_log]}}}],
formatter => {logger_logstash_formatter, #{}}
}}
]}
2017-11-30 17:09:48 +00:00
]}
2017-11-30 17:09:48 +00:00
].