2017-11-30 17:09:48 +00:00
|
|
|
[
|
2017-12-14 09:45:27 +00:00
|
|
|
|
2017-11-30 17:09:48 +00:00
|
|
|
{lager, [
|
|
|
|
{error_logger_hwm, 600},
|
|
|
|
{log_root, "/var/log/shortener"},
|
|
|
|
{handlers, [
|
|
|
|
{lager_console_backend, 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}
|
|
|
|
]}
|
|
|
|
]}
|
|
|
|
]},
|
|
|
|
|
2017-12-14 09:45:27 +00:00
|
|
|
{scoper, [
|
|
|
|
{storage, scoper_storage_lager}
|
|
|
|
]},
|
|
|
|
|
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 => "/"
|
2017-12-18 15:30:24 +00:00
|
|
|
},
|
|
|
|
source_url_whitelist => [
|
|
|
|
"https://*"
|
|
|
|
]
|
2017-12-14 15:16:48 +00:00
|
|
|
}},
|
|
|
|
{processor, #{
|
|
|
|
ip => "::",
|
|
|
|
port => 8022,
|
|
|
|
net_opts => [
|
|
|
|
{timeout , 60000}
|
|
|
|
]
|
2017-12-18 11:35:06 +00:00
|
|
|
}},
|
2017-12-14 09:45:27 +00:00
|
|
|
{service_clients, #{
|
2017-12-14 15:16:48 +00:00
|
|
|
automaton => #{url => <<"http://machinegun:8022/v1/automaton">>}
|
2018-04-13 11:21:06 +00:00
|
|
|
}},
|
|
|
|
{health_checkers, [
|
|
|
|
{erl_health, disk , ["/", 99] },
|
|
|
|
{erl_health, cg_memory, [99] },
|
|
|
|
{erl_health, service , [<<"shortener">>]}
|
|
|
|
]}
|
2017-11-30 17:09:48 +00:00
|
|
|
]}
|
2017-12-14 09:45:27 +00:00
|
|
|
|
2017-11-30 17:09:48 +00:00
|
|
|
].
|