2017-11-30 17:09:48 +00:00
|
|
|
[
|
2017-12-14 09:45:27 +00:00
|
|
|
{scoper, [
|
2019-04-26 08:42:33 +00:00
|
|
|
{storage, scoper_storage_logger}
|
2017-12-14 09:45:27 +00:00
|
|
|
]},
|
|
|
|
|
2017-11-30 17:09:48 +00:00
|
|
|
{shortener, [
|
2020-11-23 15:38:51 +00:00
|
|
|
{bouncer_ruleset_id , <<"service/authz/api">>},
|
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 => "/"
|
2017-12-18 15:30:24 +00:00
|
|
|
},
|
|
|
|
source_url_whitelist => [
|
|
|
|
"https://*"
|
|
|
|
]
|
2017-12-14 15:16:48 +00:00
|
|
|
}},
|
|
|
|
{processor, #{
|
|
|
|
ip => "::",
|
|
|
|
port => 8022,
|
MSPF-396: update to erlang 21 (#13)
* MSPF-396: update to erlang 21 (#12)
* Setup to run on local machine
* Migrated to new erlang/cowboy with dependencies
* Updated dependecies & fixed wrong error handling
* Removed redundant dependecy and hid generated apps
* Removed extra cors module, added Options to handler
* Fixed middleware misplacement, and properly implemented handler behaviour
* cleaned up
* returned to url instead of http in private repos
* Returned to using cowboy_cors as CORS app, fixed typing, added epic branches rules for Jenkins
* added missing dependency, divided net_opts option
* Updated cors policy, added cors tests
* Reverted unnessesary Jenkinsfile changes
* Suppresed jesse warnings
* Updated build image tag
* Switched to using new jesse and parse_trans
* Bumped utils and image tags, updated registry
* bumped base image
* bumped build_utils, removed registry redefinition
* Refreshed outdated config (#14)
* bumped erlang-health, fixed lager crash
* Upgraded lager, restored redirection, refreshed config
* Refreshed deprecated ranch opts passing
* Switched to master branches
* Bumped build image
2019-04-03 14:20:56 +00:00
|
|
|
protocol_opts => #{
|
|
|
|
request_timeout => 60000
|
|
|
|
}
|
2017-12-18 11:35:06 +00:00
|
|
|
}},
|
2017-12-14 09:45:27 +00:00
|
|
|
{service_clients, #{
|
2019-01-22 12:37:01 +00:00
|
|
|
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
|
|
|
|
}
|
2020-11-23 15:38:51 +00:00
|
|
|
},
|
|
|
|
bouncer => #{
|
|
|
|
url => <<"http://bouncer:8022/">>,
|
|
|
|
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
|
|
|
|
'Judge' => {linear, 3, 1000},
|
|
|
|
'_' => finish
|
|
|
|
}
|
2019-01-22 12:37:01 +00:00
|
|
|
}
|
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, [
|
2019-04-26 08:42:33 +00:00
|
|
|
{logger_level, info},
|
|
|
|
{logger, [
|
|
|
|
{handler, default, logger_std_h, #{
|
|
|
|
level => debug,
|
|
|
|
config => #{
|
2019-06-25 14:20:00 +00:00
|
|
|
type => file,
|
|
|
|
file => "/var/log/shortener/console.json",
|
2019-04-26 08:42:33 +00:00
|
|
|
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, #{}}
|
|
|
|
}}
|
|
|
|
]}
|
2020-10-23 19:13:20 +00:00
|
|
|
]},
|
|
|
|
|
|
|
|
{prometheus, [
|
|
|
|
{collectors, [default]}
|
2017-11-30 17:09:48 +00:00
|
|
|
]}
|
2017-12-14 09:45:27 +00:00
|
|
|
|
2017-11-30 17:09:48 +00:00
|
|
|
].
|