Merge pull request 'Configure local LND as Lightning node in BTCPay Server' (#275) from feature/btcpay_lnd_settings into feauture/lnd
Reviewed-on: #275
This commit is contained in:
commit
9ab097dd9a
@ -18,6 +18,7 @@ bash 'build_btcpay' do
|
|||||||
cwd node['btcpay']['source_dir']
|
cwd node['btcpay']['source_dir']
|
||||||
code './build.sh'
|
code './build.sh'
|
||||||
action :nothing
|
action :nothing
|
||||||
|
notifies :restart, "systemd_unit[btcpayserver.service]", :delayed
|
||||||
end
|
end
|
||||||
|
|
||||||
directory "/home/#{node['bitcoin']['username']}/.btcpayserver" do
|
directory "/home/#{node['bitcoin']['username']}/.btcpayserver" do
|
||||||
@ -36,6 +37,8 @@ end
|
|||||||
|
|
||||||
credentials = Chef::EncryptedDataBagItem.load('credentials', 'btcpay')
|
credentials = Chef::EncryptedDataBagItem.load('credentials', 'btcpay')
|
||||||
|
|
||||||
|
lnd_admin_macaroon_path = "#{node['lnd']['lnd_dir']}/data/chain/bitcoin/mainnet/admin.macaroon" rescue nil
|
||||||
|
|
||||||
template node['btcpay']['config_path'] do
|
template node['btcpay']['config_path'] do
|
||||||
source "btcpay-settings.config.erb"
|
source "btcpay-settings.config.erb"
|
||||||
owner node['bitcoin']['username']
|
owner node['bitcoin']['username']
|
||||||
@ -49,7 +52,9 @@ template node['btcpay']['config_path'] do
|
|||||||
postgres_port: node['btcpay']['postgres']['port'],
|
postgres_port: node['btcpay']['postgres']['port'],
|
||||||
postgres_database: node['btcpay']['postgres']['database'],
|
postgres_database: node['btcpay']['postgres']['database'],
|
||||||
postgres_user: node['btcpay']['postgres']['user'],
|
postgres_user: node['btcpay']['postgres']['user'],
|
||||||
postgres_password: credentials['postgres_password']
|
postgres_password: credentials['postgres_password'],
|
||||||
|
lnd_admin_macaroon_path: lnd_admin_macaroon_path
|
||||||
|
notifies :restart, "systemd_unit[btcpayserver.service]", :delayed
|
||||||
end
|
end
|
||||||
|
|
||||||
directory '/run/btcpayserver' do
|
directory '/run/btcpayserver' do
|
||||||
|
@ -2,7 +2,9 @@ network=<%= @bitcoin_network %>
|
|||||||
port=<%= @btcpay_port %>
|
port=<%= @btcpay_port %>
|
||||||
bind=127.0.0.1
|
bind=127.0.0.1
|
||||||
chains=btc
|
chains=btc
|
||||||
BTC.explorer.url=<%= @nbxplorer_url %>
|
|
||||||
postgres=User ID=<%= @postgres_user %>;Password=<%= @postgres_password %>;Host=<%= @postgres_host %>;Port=<%= @postgres_port %>;Database=<%= @postgres_database %>;
|
postgres=User ID=<%= @postgres_user %>;Password=<%= @postgres_password %>;Host=<%= @postgres_host %>;Port=<%= @postgres_port %>;Database=<%= @postgres_database %>;
|
||||||
debuglog=<%= @btcpay_log_path %>
|
debuglog=<%= @btcpay_log_path %>
|
||||||
<%# TODO BTC.lightning=type=clightning;server=/mnt/data/lightningd/lightning-rpc %>
|
BTC.explorer.url=<%= @nbxplorer_url %>
|
||||||
|
<% if @lnd_admin_macaroon_path %>
|
||||||
|
BTC.lightning=type=lnd-rest;server=https://127.0.0.1:8080/;macaroonfilepath=<%= @lnd_admin_macaroon_path %>;allowinsecure=true
|
||||||
|
<% end %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user