mirror of
https://github.com/aljazceru/btcpayserver-docker.git
synced 2026-02-11 15:54:32 +01:00
use own container for tor relay because of https://trac.torproject.org/projects/tor/ticket/8742
This commit is contained in:
16
Generated/torrc-relay.tmpl
Normal file
16
Generated/torrc-relay.tmpl
Normal file
@@ -0,0 +1,16 @@
|
||||
SocksPort 0
|
||||
RunAsDaemon 1
|
||||
ORPort 9001
|
||||
DirPort 9030
|
||||
ExitPolicy reject *:*
|
||||
DisableDebuggerAttachment 0
|
||||
ControlPort 9051
|
||||
CookieAuthentication 1
|
||||
|
||||
Nickname {{ $.Env.TOR_RELAY_NICKNAME}}
|
||||
ContactInfo {{ $.Env.TOR_RELAY_EMAIL}}
|
||||
|
||||
|
||||
{{ if $.Env.ADDITIONAL_TORRC_CONFIG }}
|
||||
{{ $.Env.ADDITIONAL_TORRC_CONFIG}}
|
||||
{{ end }}
|
||||
@@ -110,7 +110,6 @@ You can read [the article](https://medium.com/@BtcpayServer/hosting-btcpay-serve
|
||||
* `BTCPAYGEN_EXCLUDE_FRAGMENTS`: Semicolon-separated list of fragments you want to forcefully exclude (eg. `litecoin-clightning`)
|
||||
* `TOR_RELAY_NICKNAME`: If tor relay is activated with opt-add-tor-relay, the relay nickname
|
||||
* `TOR_RELAY_EMAIL`: If tor relay is activated with opt-add-tor-relay, the email for Tor to contact you regarding your relay
|
||||
* `ADDITIONAL_TORRC_CONFIG`: Additional config settings to pass to tor
|
||||
|
||||
Additionally, there are specific environment variables for some addons:
|
||||
|
||||
|
||||
@@ -106,7 +106,6 @@ Add-on specific variables:
|
||||
BTCTRANSMUTER_HOST: If btc transmuter is activated with opt-add-btctransmuter, the hostname of your btc transmuter website (eg. store.example.com)
|
||||
TOR_RELAY_NICKNAME: If tor relay is activated with opt-add-tor-relay, the relay nickname
|
||||
TOR_RELAY_EMAIL: If tor relay is activated with opt-add-tor-relay, the email for Tor to contact you regarding your relay
|
||||
ADDITIONAL_TORRC_CONFIG: Additional config settings to pass to tor
|
||||
END
|
||||
}
|
||||
START=""
|
||||
@@ -306,7 +305,6 @@ BTCPAY_IMAGE:$BTCPAY_IMAGE
|
||||
ACME_CA_URI:$ACME_CA_URI
|
||||
TOR_RELAY_NICKNAME: $TOR_RELAY_NICKNAME
|
||||
TOR_RELAY_EMAIL: $TOR_RELAY_EMAIL
|
||||
ADDITIONAL_TORRC_CONFIG: $ADDITIONAL_TORRC_CONFIG
|
||||
----------------------
|
||||
Additional exported variables:
|
||||
BTCPAY_DOCKER_COMPOSE=$BTCPAY_DOCKER_COMPOSE
|
||||
|
||||
@@ -1,17 +1,35 @@
|
||||
version: "3"
|
||||
services:
|
||||
tor-gen:
|
||||
tor-relay-gen:
|
||||
restart: unless-stopped
|
||||
image: btcpayserver/docker-gen:0.7.6
|
||||
container_name: tor-gen
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/tmp/docker.sock:ro"
|
||||
- "./torrc-relay.tmpl:/etc/docker-gen/templates/torrc.tmpl:ro"
|
||||
- "tor_relay_torrcdir:/usr/local/etc/tor"
|
||||
entrypoint: /usr/local/bin/docker-gen -notify-sighup tor-relay -watch -wait 5s:30s /etc/docker-gen/templates/torrc.tmpl /usr/local/etc/tor/torrc-2
|
||||
links:
|
||||
- tor-relay
|
||||
environment:
|
||||
ADDITIONAL_TORRC_CONFIG: |
|
||||
ORPort 9001
|
||||
DirPort 9030
|
||||
ExitPolicy reject *:*
|
||||
ExitPolicy reject6 *:*
|
||||
ExitRelay 1
|
||||
IPv6Exit 1
|
||||
Nickname ${TOR_RELAY_NICKNAME}
|
||||
ContactInfo ${TOR_RELAY_EMAIL}
|
||||
tor:
|
||||
TOR_RELAY_NICKNAME: ${TOR_RELAY_NICKNAME}
|
||||
TOR_RELAY_EMAIL: ${TOR_RELAY_EMAIL}
|
||||
|
||||
tor-relay:
|
||||
restart: unless-stopped
|
||||
image: btcpayserver/tor:0.4.1.5
|
||||
container_name: tor-relay
|
||||
environment:
|
||||
TOR_PASSWORD: btcpayserver
|
||||
TOR_ADDITIONAL_CONFIG: /usr/local/etc/tor/torrc-2
|
||||
TOR_EXTRA_ARGS: |
|
||||
CookieAuthentication 1
|
||||
volumes:
|
||||
- "tor_relay_datadir:/home/tor/.tor"
|
||||
- "tor_relay_torrcdir:/usr/local/etc/tor"
|
||||
ports:
|
||||
- "9001"
|
||||
- "9030"
|
||||
- "9030"
|
||||
volumes:
|
||||
tor_relay_datadir:
|
||||
tor_relay_torrcdir:
|
||||
@@ -96,9 +96,6 @@ services:
|
||||
restart: unless-stopped
|
||||
image: btcpayserver/docker-gen:0.7.6
|
||||
container_name: tor-gen
|
||||
environment:
|
||||
ADDITIONAL_TORRC_CONFIG: |
|
||||
${ADDITIONAL_TORRC_CONFIG}
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/tmp/docker.sock:ro"
|
||||
- "./torrc.tmpl:/etc/docker-gen/templates/torrc.tmpl:ro"
|
||||
|
||||
@@ -89,8 +89,7 @@ BTCTRANSMUTER_HOST=$BTCTRANSMUTER_HOST
|
||||
BTCPAY_CRYPTOS=$BTCPAY_CRYPTOS
|
||||
WOOCOMMERCE_HOST=$WOOCOMMERCE_HOST
|
||||
TOR_RELAY_NICKNAME=$TOR_RELAY_NICKNAME
|
||||
TOR_RELAY_EMAIL=$TOR_RELAY_EMAIL
|
||||
ADDITIONAL_TORRC_CONFIG=$ADDITIONAL_TORRC_CONFIG" > $BTCPAY_ENV_FILE
|
||||
TOR_RELAY_EMAIL=$TOR_RELAY_EMAIL" > $BTCPAY_ENV_FILE
|
||||
}
|
||||
|
||||
btcpay_up() {
|
||||
|
||||
Reference in New Issue
Block a user