mirror of
https://github.com/Retropex/btcpayserver-docker.git
synced 2025-05-12 21:10:42 +02:00
Add docker fragment for opt-txindex to enable txindex=1 (#178)
* Add docker fragment for opt-txindex to enable txindex=1 * Document opt-txindex in README * Throw error if both opt-txindex and opt-save-storage-* are enabled
This commit is contained in:
parent
ab0d869344
commit
23bf0ea4bf
@ -180,6 +180,7 @@ Available `BTCPAYGEN_ADDITIONAL_FRAGMENTS` currently are:
|
||||
* [opt-add-woocommerce](docker-compose-generator/docker-fragments/opt-add-woocommerce.yml), for a self-hosted woocommerce with BTCPay Server plugin pre installed.
|
||||
* [opt-add-tor](docker-compose-generator/docker-fragments/opt-add-tor.yml), for exposing BTCPayServer, Woocommerce, your lightning nodes as hidden services and accept onion peers for your full node. Warning: This options is for working around NAT and firewall problems as well as to help protect your customer's privacy. This will not protect your privacy against a targeted attack against you.
|
||||
* [opt-add-btctransmuter](docker-compose-generator/docker-fragments/opt-add-btctransmuter.yml), for a self-hosted IFTTT style service for crypto services such as fiat settlement.
|
||||
* [opt-txindex](docker-compose-generator/docker-fragments/opt-txindex.yml), to enable txindex=1 in bitcoin.conf if you require txindexing for Bisq, DOJO, Esplora, etc.
|
||||
|
||||
You can also create your own [custom fragments](#how-can-i-customize-the-generated-docker-compose-file).
|
||||
|
||||
|
@ -229,6 +229,15 @@ if [[ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]] && [[ "$BTCPAY_HOST" ]]; then
|
||||
BTCPAY_HOST="$DOMAIN_NAME"
|
||||
fi
|
||||
|
||||
# Since opt-txindex requires unpruned node, throw an error if both
|
||||
# opt-txindex and opt-save-storage-* are enabled together
|
||||
if [[ "${BTCPAYGEN_ADDITIONAL_FRAGMENTS}" == *opt-txindex* ]] && \
|
||||
[[ "${BTCPAYGEN_ADDITIONAL_FRAGMENTS}" == *opt-save-storage* ]];then
|
||||
echo "Error: BTCPAYGEN_ADDITIONAL_FRAGMENTS contains both opt-txindex and opt-save-storage*"
|
||||
echo "opt-txindex requires an unpruned node, so you cannot use opt-save-storage with it"
|
||||
return
|
||||
fi
|
||||
|
||||
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
|
||||
. helpers.sh
|
||||
btcpay_expand_variables
|
||||
|
32
docker-compose-generator/docker-fragments/opt-txindex.yml
Normal file
32
docker-compose-generator/docker-fragments/opt-txindex.yml
Normal file
@ -0,0 +1,32 @@
|
||||
version: "3"
|
||||
# must not use opt-save-storage
|
||||
|
||||
services:
|
||||
bitcoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
txindex=1
|
||||
bgoldd:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
txindex=1
|
||||
feathercoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
txindex=1
|
||||
groestlcoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
txindex=1
|
||||
litecoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
txindex=1
|
||||
viacoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
txindex=1
|
||||
monacoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
txindex=1
|
Loading…
Reference in New Issue
Block a user