Route lnrpc.Lightning if the lnd container exists

This commit is contained in:
nicolas.dorier
2018-09-07 11:27:10 +09:00
parent 7f4ddbe626
commit b8600c974f

View File

@@ -298,11 +298,13 @@ server {
{{ end }}
}
{{ if (exists "/lnd/tls.cert") }}
location /lnrpc.Lightning {
grpc_pass grpcs://lnd_bitcoin:10009;
grpc_ssl_trusted_certificate /lnd/tls.cert;
}
{{ range $container := $ }}
{{ $serviceName := (index $container.Labels "com.docker.compose.service") }}
{{ if (eq $serviceName "lnd_bitcoin") }}
location /lnrpc.Lightning {
grpc_pass grpcs://lnd_bitcoin:10009;
}
{{ end }}
{{ end }}
}