fistful-server/config/sys.config
Andrey Fadeev 89f1d570a7
FF-77 Use party_client for PartyManagement calls (#127)
* Rename ff_ctx to ff_entity_context
* Add runtime context and pass it through all woody handlers
* Add party_client usage
2019-10-07 11:45:00 +03:00

183 lines
5.9 KiB
Plaintext

[
{kernel, [
{log_level, info},
{logger, [
{handler, default, logger_std_h, #{
level => debug,
config => #{
type => {file, "/var/log/fistful-server/console.json"},
sync_mode_qlen => 20
},
formatter => {logger_logstash_formatter, #{}}
}}
]}
]},
{scoper, [
{storage, scoper_storage_logger}
]},
{dmt_client, [
{max_cache_size, #{
elements => 1
}},
{service_urls, #{
'Repository' => <<"http://dominant:8022/v1/domain/repository">>,
'RepositoryClient' => <<"http://dominant:8022/v1/domain/repository_client">>
}}
]},
{party_client, [
{services, #{
party_management => "http://hellgate:8022/v1/processing/partymgmt"
}},
{woody, #{
cache_mode => safe, % disabled | safe | aggressive
options => #{
woody_client => #{
event_handler => scoper_woody_event_handler
}
}
}}
]},
{fistful, [
{providers, #{
<<"ncoeps">> => #{
payment_institution_id => 100,
routes => [<<"mocketbank">>],
identity_classes => #{
<<"person">> => #{
name => <<"Person">>,
contract_template_id => 10000,
initial_level => <<"anonymous">>,
levels => #{
<<"anonymous">> => #{
name => <<"Anonymous">>,
contractor_level => none
},
<<"partly-identified">> => #{
name => <<"Partially identified">>,
contractor_level => partial
},
<<"identified">> => #{
name => <<"Fully identified">>,
contractor_level => full
}
},
challenges => #{
<<"esia">> => #{
name => <<"ЕСИА">>,
base => <<"anonymous">>,
target => <<"partly-identified">>
}
}
}
}
}
}},
{services, #{
'eventsink' => "http://machinegun:8022/v1/event_sink",
'automaton' => "http://machinegun:8022/v1/automaton",
'accounter' => "http://shumway:8022/accounter",
'identification' => "http://identification:8022/v1/identification"
}}
]},
{ff_transfer, [
{max_session_poll_timeout, 14400} %% 4h
]},
%% wapi
{wapi, [
{ip, "::"},
{port, 8080},
%% To send ASCII text in 5xx replies
%% {oops_bodies, #{
%% 500 => "oops_bodies/500_body"
%% }},
{realm, <<"external">>},
{public_endpoint, <<"http://wapi">>},
{authorizers, #{
jwt => #{
signee => wapi,
keyset => #{
wapi => {pem_file, "var/keys/wapi/private.pem"}
}
}
}},
{health_check, #{
service => {erl_health, service , [<<"wapi">>]}
}},
{max_deadline, 60000}, % milliseconds
{file_storage_url_lifetime, 60} % seconds
]},
{wapi_woody_client, [
{service_urls, #{
webhook_manager => "http://hooker:8022/hook",
cds_storage => "http://cds:8022/v1/storage",
identdoc_storage => "http://cds:8022/v1/identity_document_storage",
fistful_stat => "http://fistful-magista:8022/stat"
}},
{api_deadlines, #{
wallet => 5000 % millisec
}},
{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
}
}}
]},
{ff_server, [
{ip, "::"},
{port, 8022},
{woody_opts, #{
net_opts => [
% Bump keepalive timeout up to a minute
{timeout, 60000}
]
}},
{net_opts, [
% Bump keepalive timeout up to a minute
{timeout, 60000}
]},
{health_check, #{
disk => {erl_health, disk , ["/", 99] },
memory => {erl_health, cg_memory, [99] },
service => {erl_health, service , [<<"fistful-server">>]}
}},
{eventsink, #{
identity => #{
namespace => <<"ff/identity">>
},
wallet => #{
namespace => <<"ff/wallet_v2">>
},
withdrawal => #{
namespace => <<"ff/withdrawal_v2">>
},
deposit => #{
namespace => <<"ff/deposit_v1">>
},
destination => #{
namespace => <<"ff/destination_v2">>
},
source => #{
namespace => <<"ff/source_v1">>
},
withdrawal_session => #{
namespace => <<"ff/withdrawal/session_v2">>
}
}}
]}
].