url-shortener/config/sys.config
Toporkov Igor 1b31deb9f7
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 17:20:56 +03:00

82 lines
2.5 KiB
Plaintext

[
{lager, [
{error_logger_hwm, 600},
{log_root, "/var/log/shortener"},
{handlers, [
{lager_console_backend, [{level, debug}]},
{lager_file_backend, [
{file, "console.json"},
{level, debug},
{formatter, lager_logstash_formatter}
]}
]},
{extra_sinks, [
{shortener_access_lager_event, [
{handlers, [
{lager_file_backend, [
{file, "access_log.json"},
{level, info},
{formatter, lager_logstash_formatter}
]}
]},
{async_threshold, 20},
{async_threshold_window, 5}
]}
]}
]},
{scoper, [
{storage, scoper_storage_lager}
]},
{shortener, [
{space_size , 8},
{hash_algorithm , sha256},
{api, #{
ip => "::",
port => 8080,
authorizer => #{
keyset => #{}
},
short_url_template => #{
scheme => https,
netloc => "rbk.mn",
path => "/"
},
source_url_whitelist => [
"https://*"
]
}},
{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
}
}
}},
{health_checkers, [
{erl_health, disk , ["/", 99] },
{erl_health, cg_memory, [99] },
{erl_health, service , [<<"shortener">>]}
]}
]}
].