include domain BTCPAY_HOST

master
lza_menace 6 days ago
parent fe5ba888d8
commit 35f7195363

@ -8,6 +8,7 @@ services:
environment: environment:
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Application Name=btcpayserver;Database=btcpayserver${NBITCOIN_NETWORK:-mainnet} BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Application Name=btcpayserver;Database=btcpayserver${NBITCOIN_NETWORK:-mainnet}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-mainnet} BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-mainnet}
BTCPAY_HOST: ${BTCPAY_HOST}
BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
BTCPAY_SSHCONNECTION: root@host.docker.internal BTCPAY_SSHCONNECTION: root@host.docker.internal

@ -1,34 +0,0 @@
{{ $CurrentContainer := where $ "ID" .Docker.CurrentContainerID | first }}
{{ range $name, $containers := groupByMulti $ "Env.HIDDENSERVICE_NAME" "," }}
{{ $firstServicePort := true }}
{{ range $container := $containers }}
{{ range $knownNetwork := $CurrentContainer.Networks }}
{{ range $containerNetwork := $container.Networks }}
{{ if eq $knownNetwork.Name $containerNetwork.Name }}
{{ $containerOrReverseProxyName := coalesce $container.Env.HIDDENSERVICE_REVERSEPROXY $container.Name }}
{{ range $reverseProxyContainer := where $ "Name" $containerOrReverseProxyName }}
{{ range $containerNetwork := where $reverseProxyContainer.Networks "Name" $knownNetwork.Name }}
{{ $port := coalesceempty (index $container.Env (print $name "_HIDDENSERVICE_PORT")) $container.Env.HIDDENSERVICE_PORT "80" }}
{{ $virtualPort := coalesceempty (index $container.Env (print $name "_HIDDENSERVICE_VIRTUAL_PORT")) $container.Env.HIDDENSERVICE_VIRTUAL_PORT $port }}
{{ if ne $containerNetwork.IP "" }}
{{ if $firstServicePort }}
# For the hidden service {{ $name }}
HiddenServiceDir /var/lib/tor/hidden_services/{{ $name }}
{{ $firstServicePort := false }}
{{ end }}
# Redirecting to {{ $containerOrReverseProxyName }}
HiddenServicePort {{ $virtualPort }} {{ $containerNetwork.IP }}:{{ $port }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ if $.Env.ADDITIONAL_TORRC_CONFIG }}
{{ $.Env.ADDITIONAL_TORRC_CONFIG}}
{{ end }}
Loading…
Cancel
Save