Configure Webhook URL for lndhub.go

This commit is contained in:
Râu Cao 2023-01-12 11:39:50 +08:00
parent 2eb0544ea9
commit 4bd0f9d6ad
Signed by: raucao
GPG Key ID: 15E65F399D084BA9

View File

@ -19,6 +19,12 @@ postgres_user = node['lndhub-go']['postgres']['user']
postgres_db = node['lndhub-go']['postgres']['database']
postgres_port = node['lndhub-go']['postgres']['port']
begin
akkounts_host = search(:node, "role:akkounts").first["knife_zero"]["host"]
rescue
node['lndhub-go']['webhook_url'] = "http://#{akkounts_host}:3000/webhooks/lndhub"
end
git source_dir do
repository node['lndhub-go']['repo']
revision node['lndhub-go']['revision']
@ -58,7 +64,8 @@ template "#{source_dir}/.env" do
default_rate_limit: node['lndhub-go']['default_rate_limit'],
strict_rate_limit: node['lndhub-go']['strict_rate_limit'],
burst_rate_limit: node['lndhub-go']['burst_rate_limit'],
branding: node['lndhub-go']['branding']
branding: node['lndhub-go']['branding'],
webhook_url: node['lndhub-go']['webhook_url']
}
notifies :restart, 'service[lndhub-go]', :delayed
end