2016-08-31 17:56:24 +00:00
|
|
|
[
|
2019-07-03 08:11:31 +00:00
|
|
|
{kernel, [
|
|
|
|
{logger_level, info},
|
|
|
|
{logger, [
|
|
|
|
{handler, default, logger_std_h, #{
|
|
|
|
level => debug,
|
|
|
|
config => #{
|
|
|
|
type => {file, "/var/log/capi/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/capi/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, #{}}
|
|
|
|
}}
|
2016-09-05 12:21:44 +00:00
|
|
|
]}
|
|
|
|
]},
|
|
|
|
|
2019-08-09 13:10:32 +00:00
|
|
|
{scoper, [
|
|
|
|
{storage, scoper_storage_logger}
|
|
|
|
]},
|
|
|
|
|
2016-09-05 12:21:44 +00:00
|
|
|
{capi, [
|
2017-02-04 16:08:42 +00:00
|
|
|
{ip, "::"},
|
2016-08-31 17:56:24 +00:00
|
|
|
{port, 8080},
|
2017-05-03 11:00:02 +00:00
|
|
|
%% To send ASCII text in 5xx replies
|
|
|
|
%% {oops_bodies, #{
|
|
|
|
%% 500 => "oops_bodies/500_body"
|
|
|
|
%% }},
|
2017-08-15 12:34:27 +00:00
|
|
|
{reporter_url_lifetime, 60}, % seconds
|
2019-09-12 11:55:11 +00:00
|
|
|
{graceful_shutdown_timeout, 5000}, % non_neg_integer() | infinity
|
2016-09-05 12:21:44 +00:00
|
|
|
{service_type, real},
|
2019-11-06 13:58:46 +00:00
|
|
|
{access_conf, #{
|
2017-02-22 11:36:17 +00:00
|
|
|
jwt => #{
|
|
|
|
keyset => #{
|
|
|
|
capi => {pem_file, "var/keys/capi/private.pem"}
|
|
|
|
}
|
|
|
|
}
|
2018-04-13 12:35:02 +00:00
|
|
|
}},
|
2019-07-08 09:47:25 +00:00
|
|
|
{swagger_handler_opts, #{
|
|
|
|
validation_opts => #{
|
|
|
|
schema => #{
|
|
|
|
response => mild
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}},
|
2021-02-01 15:30:04 +00:00
|
|
|
{api_key_blacklist, #{
|
2020-09-15 05:40:30 +00:00
|
|
|
update_interval => 50000, % milliseconds
|
|
|
|
blacklisted_keys_dir => "var/blacklisted_keys"
|
2021-02-01 15:30:04 +00:00
|
|
|
}},
|
|
|
|
{health_check, #{
|
|
|
|
disk => {erl_health, disk , ["/", 99]},
|
|
|
|
memory => {erl_health, cg_memory, [99]},
|
|
|
|
service => {erl_health, service , [<<"capi">>]}
|
|
|
|
}},
|
2020-07-14 13:38:52 +00:00
|
|
|
{max_request_deadline, 60000}, % milliseconds
|
2020-01-23 13:17:17 +00:00
|
|
|
{default_processing_deadline, <<"30m">>},
|
|
|
|
{lechiffre_opts, #{
|
2020-01-23 15:55:30 +00:00
|
|
|
encryption_key_path => <<"path/to/key1.secret">>,
|
|
|
|
decryption_key_paths => [<<"path/to/key1.secret">>]
|
2020-01-23 13:17:17 +00:00
|
|
|
}}
|
2016-09-05 12:21:44 +00:00
|
|
|
]},
|
|
|
|
|
2017-10-10 21:02:17 +00:00
|
|
|
{capi_woody_client, [
|
2019-07-25 13:55:15 +00:00
|
|
|
{services, #{
|
2017-10-23 14:01:01 +00:00
|
|
|
party_management => "http://hellgate:8022/v1/processing/partymgmt",
|
|
|
|
customer_management => "http://hellgate:8022/v1/processing/customer_management",
|
|
|
|
accounter => "http://shumway:8022/accounter",
|
|
|
|
invoicing => "http://hellgate:8022/v1/processing/invoicing",
|
|
|
|
invoice_templating => "http://hellgate:8022/v1/processing/invoice_templating",
|
|
|
|
webhook_manager => "http://hooker:8022/hook",
|
|
|
|
merchant_stat => "http://magista:8022/stat",
|
|
|
|
reporting => "http://reporter:8022/reports",
|
2018-05-08 13:26:49 +00:00
|
|
|
geo_ip_service => "http://columbus:8022/repo",
|
2019-04-16 13:38:14 +00:00
|
|
|
bender => "http://bender:8022/v1/bender"
|
2018-07-06 07:50:08 +00:00
|
|
|
}},
|
|
|
|
{service_deadlines, #{
|
|
|
|
party_management => 5000, % milliseconds
|
|
|
|
customer_management => 10000
|
2018-11-26 08:46:01 +00:00
|
|
|
}},
|
|
|
|
{service_retries, #{
|
|
|
|
party_management => #{
|
|
|
|
% 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
|
|
|
|
'Get' => {linear, 3, 1000},
|
|
|
|
'_' => finish
|
|
|
|
}
|
2016-09-05 12:21:44 +00:00
|
|
|
}}
|
2018-05-17 11:10:30 +00:00
|
|
|
]},
|
|
|
|
|
|
|
|
{dmt_client, [
|
|
|
|
{cache_update_interval, 30000}, % milliseconds
|
|
|
|
{max_cache_size, #{
|
|
|
|
elements => 20,
|
|
|
|
memory => 52428800 % 50Mb
|
|
|
|
}},
|
|
|
|
{service_urls, #{
|
|
|
|
'Repository' => <<"dominant:8022/v1/domain/repository">>,
|
|
|
|
'RepositoryClient' => <<"dominant:8022/v1/domain/repository_client">>
|
|
|
|
}}
|
2019-01-14 21:37:48 +00:00
|
|
|
]},
|
2018-05-17 11:10:30 +00:00
|
|
|
|
2020-09-17 14:10:33 +00:00
|
|
|
{bender_client, [
|
|
|
|
{services, #{
|
|
|
|
'Bender' => <<"http://bender:8022/v1/bender">>,
|
|
|
|
'Generator' => <<"http://bender:8022/v1/generator">>
|
|
|
|
}},
|
|
|
|
{deadline, 60000}
|
|
|
|
%{retries, #{
|
|
|
|
% 'GenerateID' => finish,
|
|
|
|
% 'GetInternalID' => finish,
|
|
|
|
% '_' => finish
|
|
|
|
%}}
|
|
|
|
]},
|
|
|
|
|
2019-01-14 21:37:48 +00:00
|
|
|
{how_are_you, [
|
|
|
|
{metrics_publishers, [
|
|
|
|
% {hay_statsd_publisher, #{
|
|
|
|
% key_prefix => <<"capi-v2.">>,
|
|
|
|
% host => "localhost",
|
|
|
|
% port => 8125
|
|
|
|
% }}
|
|
|
|
]}
|
2019-11-06 13:58:46 +00:00
|
|
|
]},
|
|
|
|
|
|
|
|
{snowflake, [
|
|
|
|
% {machine_id, 42}
|
2020-10-23 13:48:22 +00:00
|
|
|
]},
|
|
|
|
|
|
|
|
{prometheus, [
|
|
|
|
{collectors, [default]}
|
2019-01-14 21:37:48 +00:00
|
|
|
]}
|
2016-08-31 17:56:24 +00:00
|
|
|
].
|