2023-07-26 15:00:55 +02:00

23 lines
556 B
Ruby

#
# Cookbook:: kosmos-bitcoin
# Recipe:: nginx_lndhub
#
domain = node['lndhub-go']['domain']
upstream_host = search(:node, "role:lndhub").first["knife_zero"]["host"]
tls_cert_for domain do
auth "gandi_dns"
action :create
end
openresty_site domain do
template 'nginx_conf_lndhub.erb'
variables server_name: domain,
port: node['lndhub-go']['port'],
ssl_cert: "/etc/letsencrypt/live/#{domain}/fullchain.pem",
ssl_key: "/etc/letsencrypt/live/#{domain}/privkey.pem",
upstream_host: upstream_host
end