Browse Source

Merge branch 'refactor/nginx-path'

feature/auto_ssh
nicolas.dorier 6 years ago
parent
commit
3cdb112080
  1. 4
      Production/nginx.tmpl
  2. 1
      docker-compose-generator/docker-fragments/btcpayserver-nginx.yml

4
Production/nginx.tmpl

@ -160,6 +160,8 @@ upstream {{ $upstream_name }} {
{{/* Get the VIRTUAL_PROTO defined by containers w/ the same vhost, falling back to "http" */}} {{/* Get the VIRTUAL_PROTO defined by containers w/ the same vhost, falling back to "http" */}}
{{ $proto := trim (or (first (groupByKeys $containers "Env.VIRTUAL_PROTO")) "http") }} {{ $proto := trim (or (first (groupByKeys $containers "Env.VIRTUAL_PROTO")) "http") }}
{{ $service_name := trim (or (first (groupByKeys $containers "Env.VIRTUAL_SERVICE_NAME")) "") }}
{{/* Get the NETWORK_ACCESS defined by containers w/ the same vhost, falling back to "external" */}} {{/* Get the NETWORK_ACCESS defined by containers w/ the same vhost, falling back to "external" */}}
{{ $network_tag := or (first (groupByKeys $containers "Env.NETWORK_ACCESS")) "external" }} {{ $network_tag := or (first (groupByKeys $containers "Env.NETWORK_ACCESS")) "external" }}
@ -297,6 +299,7 @@ server {
{{ end }} {{ end }}
} }
{{ if eq $service_name "btcpay" }}
{{ range $container := $ }} {{ range $container := $ }}
{{ $serviceName := (index $container.Labels "com.docker.compose.service") }} {{ $serviceName := (index $container.Labels "com.docker.compose.service") }}
{{ if (eq $serviceName "lnd_bitcoin") }} {{ if (eq $serviceName "lnd_bitcoin") }}
@ -339,6 +342,7 @@ server {
{{ end }} {{ end }}
{{ end }}
{{ end }} {{ end }}
} }

1
docker-compose-generator/docker-fragments/btcpayserver-nginx.yml

@ -8,6 +8,7 @@ services:
VIRTUAL_NETWORK: nginx-proxy VIRTUAL_NETWORK: nginx-proxy
VIRTUAL_PORT: 49392 VIRTUAL_PORT: 49392
VIRTUAL_HOST: ${BTCPAY_HOST} VIRTUAL_HOST: ${BTCPAY_HOST}
VIRTUAL_SERVICE_NAME: "btcpay"
SSL_POLICY: Mozilla-Modern SSL_POLICY: Mozilla-Modern
# Let's encrypt settings # Let's encrypt settings

Loading…
Cancel
Save