mirror of
https://github.com/aljazceru/btcpayserver-docker.git
synced 2026-02-23 14:24:30 +01:00
merge upstream changes
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -297,3 +297,8 @@ Production/.env
|
||||
.vscode/
|
||||
*docker-compose.generated.yml
|
||||
|
||||
Generated/acme.json
|
||||
Generated/traefik_logs/
|
||||
Generated/error
|
||||
|
||||
|
||||
|
||||
4
Generated/.gitignore
vendored
4
Generated/.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
*.yml
|
||||
*.tmpl
|
||||
*.tmpl
|
||||
*.toml
|
||||
*.json
|
||||
@@ -1,17 +1,4 @@
|
||||
# About those pre-generated docker-compose
|
||||
|
||||
All `docker-compose` files in this folder are generated by running the [build-pregen.sh](build-pregen.sh) (or [build-pregen.ps1](build-pregen.ps1)) script from the fragments located in [docker-compose-generator/docker-fragments](docker-compose-generator/docker-fragments).
|
||||
|
||||
The pre-generated `docker-compose` files only cover `btc`, `ltc`, `clightning` without reverse proxy.
|
||||
|
||||
---
|
||||
|
||||
We strongly advise you to not use the pre-generated docker-compose of this folder, they are deprecated and kept only for backward compatibility.
|
||||
Instead use the [build.sh](../build.sh) as documented in (README)(../Readme.md) to generate a docker-compose which fit your needs.
|
||||
|
||||
---
|
||||
|
||||
This `docker-compose` files can be used for production purpose.
|
||||
# How to use docker-compose without reverse proxy
|
||||
|
||||

|
||||
|
||||
@@ -46,7 +33,8 @@ With Powershell:
|
||||
$env:BTCPAY_ROOTPATH="/test";
|
||||
$env:BTCPAY_PROTOCOL="http";
|
||||
$env:BTCPAY_HOST="btcpay.example.com";
|
||||
docker-compose -f docker-compose.btc.yml up
|
||||
.\build.ps1
|
||||
docker-compose -f "Generated/docker-compose.generated.yml" up --remove-orphans -d
|
||||
```
|
||||
|
||||
With Linux:
|
||||
@@ -55,7 +43,8 @@ With Linux:
|
||||
export BTCPAY_ROOTPATH="/test"
|
||||
export BTCPAY_PROTOCOL="http"
|
||||
export BTCPAY_HOST="btcpay.example.com"
|
||||
docker-compose -f docker-compose.btc.yml up
|
||||
./build.sh
|
||||
docker-compose -f "Generated/docker-compose.generated.yml" up --remove-orphans -d
|
||||
```
|
||||
|
||||
Then edit your [host file](https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/) with
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
btcpayserver:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/btcpayserver:1.0.2.105
|
||||
expose:
|
||||
- "49392"
|
||||
environment:
|
||||
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_BIND: 0.0.0.0:49392
|
||||
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
|
||||
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
|
||||
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
|
||||
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
|
||||
VIRTUAL_NETWORK: nginx-proxy
|
||||
VIRTUAL_PORT: 49392
|
||||
VIRTUAL_HOST: ${BTCPAY_HOST}
|
||||
SSL_POLICY: Mozilla-Modern
|
||||
LETSENCRYPT_HOST: ${BTCPAY_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
BTCPAY_CHAINS: "btc"
|
||||
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
|
||||
BTCPAY_BTCLIGHTNING: "type=clightning;server=unix://etc/clightning_bitcoin/lightning-rpc"
|
||||
links:
|
||||
- nbxplorer
|
||||
- postgres
|
||||
- clightning_bitcoin
|
||||
volumes:
|
||||
- "btcpay_datadir:/datadir"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
- "clightning_bitcoin_datadir:/etc/clightning_bitcoin"
|
||||
ports:
|
||||
- "80:49392"
|
||||
nbxplorer:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/nbxplorer:1.0.2.31
|
||||
expose:
|
||||
- "32838"
|
||||
environment:
|
||||
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
NBXPLORER_BIND: 0.0.0.0:32838
|
||||
NBXPLORER_CHAINS: "btc"
|
||||
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
|
||||
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
|
||||
volumes:
|
||||
- "nbxplorer_datadir:/datadir"
|
||||
- "bitcoin_datadir:/root/.bitcoin"
|
||||
links:
|
||||
- bitcoind
|
||||
postgres:
|
||||
restart: unless-stopped
|
||||
image: postgres:9.6.5
|
||||
volumes:
|
||||
- "postgres_datadir:/var/lib/postgresql/data"
|
||||
bitcoind:
|
||||
restart: unless-stopped
|
||||
container_name: btcpayserver_bitcoind
|
||||
image: nicolasdorier/docker-bitcoin:0.16.3
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
rpcport=43782
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
volumes:
|
||||
- "bitcoin_datadir:/data"
|
||||
clightning_bitcoin:
|
||||
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
|
||||
container_name: btcpayserver_clightning_bitcoin
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
LIGHTNINGD_CHAIN: btc
|
||||
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
|
||||
LIGHTNINGD_OPT: |
|
||||
bitcoin-datadir=/etc/bitcoin
|
||||
bitcoin-rpcconnect=bitcoind
|
||||
announce-addr=${BTCPAY_HOST}:9735
|
||||
bind-addr=0.0.0.0:9735
|
||||
network=${NBITCOIN_NETWORK:-regtest}
|
||||
alias=${LIGHTNING_ALIAS}
|
||||
chain=btc
|
||||
volumes:
|
||||
- "clightning_bitcoin_datadir:/root/.lightning"
|
||||
- "bitcoin_datadir:/etc/bitcoin"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
ports:
|
||||
- "9735:9735"
|
||||
links:
|
||||
- nbxplorer
|
||||
- bitcoind
|
||||
volumes:
|
||||
postgres_datadir:
|
||||
btcpay_datadir:
|
||||
nbxplorer_datadir:
|
||||
bitcoin_datadir:
|
||||
clightning_bitcoin_datadir:
|
||||
@@ -1,151 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
btcpayserver:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/btcpayserver:1.0.2.105
|
||||
expose:
|
||||
- "49392"
|
||||
environment:
|
||||
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_BIND: 0.0.0.0:49392
|
||||
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
|
||||
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
|
||||
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
|
||||
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
|
||||
VIRTUAL_NETWORK: nginx-proxy
|
||||
VIRTUAL_PORT: 49392
|
||||
VIRTUAL_HOST: ${BTCPAY_HOST}
|
||||
SSL_POLICY: Mozilla-Modern
|
||||
LETSENCRYPT_HOST: ${BTCPAY_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
|
||||
BTCPAY_CHAINS: "ltc,btc"
|
||||
BTCPAY_LTCLIGHTNING: "type=clightning;server=unix://etc/clightning_litecoin/lightning-rpc"
|
||||
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
|
||||
BTCPAY_BTCLIGHTNING: "type=clightning;server=unix://etc/clightning_bitcoin/lightning-rpc"
|
||||
links:
|
||||
- nbxplorer
|
||||
- postgres
|
||||
- clightning_litecoin
|
||||
- clightning_bitcoin
|
||||
volumes:
|
||||
- "btcpay_datadir:/datadir"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
- "clightning_litecoin_datadir:/etc/clightning_litecoin"
|
||||
- "clightning_bitcoin_datadir:/etc/clightning_bitcoin"
|
||||
ports:
|
||||
- "80:49392"
|
||||
nbxplorer:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/nbxplorer:1.0.2.31
|
||||
expose:
|
||||
- "32838"
|
||||
environment:
|
||||
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
NBXPLORER_BIND: 0.0.0.0:32838
|
||||
NBXPLORER_CHAINS: "ltc,btc"
|
||||
NBXPLORER_LTCRPCURL: http://litecoind:43782/
|
||||
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
|
||||
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
|
||||
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
|
||||
volumes:
|
||||
- "nbxplorer_datadir:/datadir"
|
||||
- "litecoin_datadir:/root/.litecoin"
|
||||
- "bitcoin_datadir:/root/.bitcoin"
|
||||
links:
|
||||
- litecoind
|
||||
- bitcoind
|
||||
postgres:
|
||||
restart: unless-stopped
|
||||
image: postgres:9.6.5
|
||||
volumes:
|
||||
- "postgres_datadir:/var/lib/postgresql/data"
|
||||
litecoind:
|
||||
restart: unless-stopped
|
||||
container_name: btcpayserver_litecoind
|
||||
image: nicolasdorier/docker-litecoin:0.16.3
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
rpcport=43782
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
volumes:
|
||||
- "litecoin_datadir:/data"
|
||||
clightning_litecoin:
|
||||
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
|
||||
container_name: btcpayserver_clightning_litecoin
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
LIGHTNINGD_CHAIN: ltc
|
||||
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
|
||||
LIGHTNINGD_OPT: |
|
||||
bitcoin-datadir=/etc/litecoin
|
||||
bitcoin-rpcconnect=litecoind
|
||||
bind-addr=0.0.0.0:9735
|
||||
announce-addr=${BTCPAY_HOST}:9736
|
||||
network=${NBITCOIN_NETWORK:-regtest}
|
||||
alias=${LIGHTNING_ALIAS}
|
||||
chain=ltc
|
||||
volumes:
|
||||
- "clightning_litecoin_datadir:/root/.lightning"
|
||||
- "litecoin_datadir:/etc/litecoin"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
ports:
|
||||
- "9736:9735"
|
||||
links:
|
||||
- nbxplorer
|
||||
- litecoind
|
||||
bitcoind:
|
||||
restart: unless-stopped
|
||||
container_name: btcpayserver_bitcoind
|
||||
image: nicolasdorier/docker-bitcoin:0.16.3
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
rpcport=43782
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
volumes:
|
||||
- "bitcoin_datadir:/data"
|
||||
clightning_bitcoin:
|
||||
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
|
||||
container_name: btcpayserver_clightning_bitcoin
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
LIGHTNINGD_CHAIN: btc
|
||||
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
|
||||
LIGHTNINGD_OPT: |
|
||||
bitcoin-datadir=/etc/bitcoin
|
||||
bitcoin-rpcconnect=bitcoind
|
||||
announce-addr=${BTCPAY_HOST}:9735
|
||||
bind-addr=0.0.0.0:9735
|
||||
network=${NBITCOIN_NETWORK:-regtest}
|
||||
alias=${LIGHTNING_ALIAS}
|
||||
chain=btc
|
||||
volumes:
|
||||
- "clightning_bitcoin_datadir:/root/.lightning"
|
||||
- "bitcoin_datadir:/etc/bitcoin"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
ports:
|
||||
- "9735:9735"
|
||||
links:
|
||||
- nbxplorer
|
||||
- bitcoind
|
||||
volumes:
|
||||
postgres_datadir:
|
||||
btcpay_datadir:
|
||||
nbxplorer_datadir:
|
||||
litecoin_datadir:
|
||||
clightning_litecoin_datadir:
|
||||
bitcoin_datadir:
|
||||
clightning_bitcoin_datadir:
|
||||
@@ -1,93 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
btcpayserver:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/btcpayserver:1.0.2.105
|
||||
expose:
|
||||
- "49392"
|
||||
environment:
|
||||
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_BIND: 0.0.0.0:49392
|
||||
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
|
||||
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
|
||||
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
|
||||
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
|
||||
VIRTUAL_NETWORK: nginx-proxy
|
||||
VIRTUAL_PORT: 49392
|
||||
VIRTUAL_HOST: ${BTCPAY_HOST}
|
||||
SSL_POLICY: Mozilla-Modern
|
||||
LETSENCRYPT_HOST: ${BTCPAY_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
|
||||
BTCPAY_CHAINS: "ltc,btc"
|
||||
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
|
||||
links:
|
||||
- nbxplorer
|
||||
- postgres
|
||||
volumes:
|
||||
- "btcpay_datadir:/datadir"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
ports:
|
||||
- "80:49392"
|
||||
nbxplorer:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/nbxplorer:1.0.2.31
|
||||
expose:
|
||||
- "32838"
|
||||
environment:
|
||||
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
NBXPLORER_BIND: 0.0.0.0:32838
|
||||
NBXPLORER_CHAINS: "ltc,btc"
|
||||
NBXPLORER_LTCRPCURL: http://litecoind:43782/
|
||||
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
|
||||
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
|
||||
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
|
||||
volumes:
|
||||
- "nbxplorer_datadir:/datadir"
|
||||
- "litecoin_datadir:/root/.litecoin"
|
||||
- "bitcoin_datadir:/root/.bitcoin"
|
||||
links:
|
||||
- litecoind
|
||||
- bitcoind
|
||||
postgres:
|
||||
restart: unless-stopped
|
||||
image: postgres:9.6.5
|
||||
volumes:
|
||||
- "postgres_datadir:/var/lib/postgresql/data"
|
||||
litecoind:
|
||||
restart: unless-stopped
|
||||
container_name: btcpayserver_litecoind
|
||||
image: nicolasdorier/docker-litecoin:0.16.3
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
rpcport=43782
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
volumes:
|
||||
- "litecoin_datadir:/data"
|
||||
bitcoind:
|
||||
restart: unless-stopped
|
||||
container_name: btcpayserver_bitcoind
|
||||
image: nicolasdorier/docker-bitcoin:0.16.3
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
rpcport=43782
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
volumes:
|
||||
- "bitcoin_datadir:/data"
|
||||
volumes:
|
||||
postgres_datadir:
|
||||
btcpay_datadir:
|
||||
nbxplorer_datadir:
|
||||
litecoin_datadir:
|
||||
bitcoin_datadir:
|
||||
@@ -1,72 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
btcpayserver:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/btcpayserver:1.0.2.105
|
||||
expose:
|
||||
- "49392"
|
||||
environment:
|
||||
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_BIND: 0.0.0.0:49392
|
||||
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
|
||||
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
|
||||
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
|
||||
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
|
||||
VIRTUAL_NETWORK: nginx-proxy
|
||||
VIRTUAL_PORT: 49392
|
||||
VIRTUAL_HOST: ${BTCPAY_HOST}
|
||||
SSL_POLICY: Mozilla-Modern
|
||||
LETSENCRYPT_HOST: ${BTCPAY_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
BTCPAY_CHAINS: "btc"
|
||||
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
|
||||
links:
|
||||
- nbxplorer
|
||||
- postgres
|
||||
volumes:
|
||||
- "btcpay_datadir:/datadir"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
ports:
|
||||
- "80:49392"
|
||||
nbxplorer:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/nbxplorer:1.0.2.31
|
||||
expose:
|
||||
- "32838"
|
||||
environment:
|
||||
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
NBXPLORER_BIND: 0.0.0.0:32838
|
||||
NBXPLORER_CHAINS: "btc"
|
||||
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
|
||||
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
|
||||
volumes:
|
||||
- "nbxplorer_datadir:/datadir"
|
||||
- "bitcoin_datadir:/root/.bitcoin"
|
||||
links:
|
||||
- bitcoind
|
||||
postgres:
|
||||
restart: unless-stopped
|
||||
image: postgres:9.6.5
|
||||
volumes:
|
||||
- "postgres_datadir:/var/lib/postgresql/data"
|
||||
bitcoind:
|
||||
restart: unless-stopped
|
||||
container_name: btcpayserver_bitcoind
|
||||
image: nicolasdorier/docker-bitcoin:0.16.3
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
rpcport=43782
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
volumes:
|
||||
- "bitcoin_datadir:/data"
|
||||
volumes:
|
||||
postgres_datadir:
|
||||
btcpay_datadir:
|
||||
nbxplorer_datadir:
|
||||
bitcoin_datadir:
|
||||
@@ -1,101 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
btcpayserver:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/btcpayserver:1.0.2.105
|
||||
expose:
|
||||
- "49392"
|
||||
environment:
|
||||
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_BIND: 0.0.0.0:49392
|
||||
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
|
||||
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
|
||||
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
|
||||
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
|
||||
VIRTUAL_NETWORK: nginx-proxy
|
||||
VIRTUAL_PORT: 49392
|
||||
VIRTUAL_HOST: ${BTCPAY_HOST}
|
||||
SSL_POLICY: Mozilla-Modern
|
||||
LETSENCRYPT_HOST: ${BTCPAY_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
|
||||
BTCPAY_CHAINS: "ltc"
|
||||
BTCPAY_LTCLIGHTNING: "type=clightning;server=unix://etc/clightning_litecoin/lightning-rpc"
|
||||
links:
|
||||
- nbxplorer
|
||||
- postgres
|
||||
- clightning_litecoin
|
||||
volumes:
|
||||
- "btcpay_datadir:/datadir"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
- "clightning_litecoin_datadir:/etc/clightning_litecoin"
|
||||
ports:
|
||||
- "80:49392"
|
||||
nbxplorer:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/nbxplorer:1.0.2.31
|
||||
expose:
|
||||
- "32838"
|
||||
environment:
|
||||
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
NBXPLORER_BIND: 0.0.0.0:32838
|
||||
NBXPLORER_CHAINS: "ltc"
|
||||
NBXPLORER_LTCRPCURL: http://litecoind:43782/
|
||||
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
|
||||
volumes:
|
||||
- "nbxplorer_datadir:/datadir"
|
||||
- "litecoin_datadir:/root/.litecoin"
|
||||
links:
|
||||
- litecoind
|
||||
postgres:
|
||||
restart: unless-stopped
|
||||
image: postgres:9.6.5
|
||||
volumes:
|
||||
- "postgres_datadir:/var/lib/postgresql/data"
|
||||
litecoind:
|
||||
restart: unless-stopped
|
||||
container_name: btcpayserver_litecoind
|
||||
image: nicolasdorier/docker-litecoin:0.16.3
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
rpcport=43782
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
volumes:
|
||||
- "litecoin_datadir:/data"
|
||||
clightning_litecoin:
|
||||
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
|
||||
container_name: btcpayserver_clightning_litecoin
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
LIGHTNINGD_CHAIN: ltc
|
||||
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
|
||||
LIGHTNINGD_OPT: |
|
||||
bitcoin-datadir=/etc/litecoin
|
||||
bitcoin-rpcconnect=litecoind
|
||||
bind-addr=0.0.0.0:9735
|
||||
announce-addr=${BTCPAY_HOST}:9736
|
||||
network=${NBITCOIN_NETWORK:-regtest}
|
||||
alias=${LIGHTNING_ALIAS}
|
||||
chain=ltc
|
||||
volumes:
|
||||
- "clightning_litecoin_datadir:/root/.lightning"
|
||||
- "litecoin_datadir:/etc/litecoin"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
ports:
|
||||
- "9736:9735"
|
||||
links:
|
||||
- nbxplorer
|
||||
- litecoind
|
||||
volumes:
|
||||
postgres_datadir:
|
||||
btcpay_datadir:
|
||||
nbxplorer_datadir:
|
||||
litecoin_datadir:
|
||||
clightning_litecoin_datadir:
|
||||
@@ -1,72 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
btcpayserver:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/btcpayserver:1.0.2.105
|
||||
expose:
|
||||
- "49392"
|
||||
environment:
|
||||
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_BIND: 0.0.0.0:49392
|
||||
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
|
||||
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
|
||||
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
|
||||
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
|
||||
VIRTUAL_NETWORK: nginx-proxy
|
||||
VIRTUAL_PORT: 49392
|
||||
VIRTUAL_HOST: ${BTCPAY_HOST}
|
||||
SSL_POLICY: Mozilla-Modern
|
||||
LETSENCRYPT_HOST: ${BTCPAY_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
|
||||
BTCPAY_CHAINS: "ltc"
|
||||
links:
|
||||
- nbxplorer
|
||||
- postgres
|
||||
volumes:
|
||||
- "btcpay_datadir:/datadir"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
ports:
|
||||
- "80:49392"
|
||||
nbxplorer:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/nbxplorer:1.0.2.31
|
||||
expose:
|
||||
- "32838"
|
||||
environment:
|
||||
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
NBXPLORER_BIND: 0.0.0.0:32838
|
||||
NBXPLORER_CHAINS: "ltc"
|
||||
NBXPLORER_LTCRPCURL: http://litecoind:43782/
|
||||
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
|
||||
volumes:
|
||||
- "nbxplorer_datadir:/datadir"
|
||||
- "litecoin_datadir:/root/.litecoin"
|
||||
links:
|
||||
- litecoind
|
||||
postgres:
|
||||
restart: unless-stopped
|
||||
image: postgres:9.6.5
|
||||
volumes:
|
||||
- "postgres_datadir:/var/lib/postgresql/data"
|
||||
litecoind:
|
||||
restart: unless-stopped
|
||||
container_name: btcpayserver_litecoind
|
||||
image: nicolasdorier/docker-litecoin:0.16.3
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
rpcport=43782
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
volumes:
|
||||
- "litecoin_datadir:/data"
|
||||
volumes:
|
||||
postgres_datadir:
|
||||
btcpay_datadir:
|
||||
nbxplorer_datadir:
|
||||
litecoin_datadir:
|
||||
@@ -1,19 +1,7 @@
|
||||
# About those docker-compose
|
||||
# How to use docker-compose with NGinx
|
||||
|
||||
All `docker-compose` files in [Production](Production) and [Production-NoReverseProxy](Production-NoReverseProxy) are generated by running the [build-pregen.sh](build-pregen.sh) (or [build-pregen.ps1](build-pregen.ps1)) script from the fragments located in [docker-compose-generator/docker-fragments](docker-compose-generator/docker-fragments).
|
||||
|
||||
The pre-generated `docker-compose` files only cover `btc`, `ltc`, `clightning` with `nginx`.
|
||||
|
||||
---
|
||||
|
||||
We strongly advise you to not use the pre-generated docker-compose of this folder, they are deprecated and kept only for backward compatibility.
|
||||
Instead use the [build.sh](../build.sh) as documented in (README)(../Readme.md) to generate a docker-compose which fit your needs.
|
||||
|
||||
---
|
||||
|
||||
The `docker-compose` can be used for production purpose.
|
||||
|
||||
It is composed of:
|
||||
NGinx acts as a reverse proxy, and takes care of renewing HTTPS certificates for you.
|
||||
BTCPay Server deployment using NGinx are typically composed of:
|
||||
|
||||
1. One full node per supported cryptocurrency (bitcoind/litecoind)
|
||||
2. A lightweight block explorer ([NBxplorer](https://github.com/dgarage/NBXplorer))
|
||||
@@ -39,8 +27,6 @@ The relevant environment variables are:
|
||||
|
||||
If `BTCPAY_HOST` is `btcpay.example.com` and `BTCPAY_ROOTPATH` is `/btcpay`, then you can access the site via `https://btcpay.example.com/btcpay`
|
||||
|
||||
Use `docker-compose.btc-ltc.yml` for bitcoin and litecoin support, or `docker-compose.btc.yml` for only bitcoin.
|
||||
|
||||
Any unset or empty environment variable will be set for a `regtest` deployment.
|
||||
|
||||
The ports mapped on the host are:
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
nginx:
|
||||
restart: unless-stopped
|
||||
image: nginx:stable
|
||||
container_name: nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- "nginx_conf:/etc/nginx/conf.d"
|
||||
- "nginx_vhost:/etc/nginx/vhost.d"
|
||||
- "nginx_html:/usr/share/nginx/html"
|
||||
- "nginx_certs:/etc/nginx/certs:ro"
|
||||
links:
|
||||
- btcpayserver
|
||||
nginx-gen:
|
||||
restart: unless-stopped
|
||||
image: jwilder/docker-gen
|
||||
container_name: nginx-gen
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/tmp/docker.sock:ro"
|
||||
- "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
|
||||
- "nginx_conf:/etc/nginx/conf.d"
|
||||
- "nginx_vhost:/etc/nginx/vhost.d"
|
||||
- "nginx_html:/usr/share/nginx/html"
|
||||
- "nginx_certs:/etc/nginx/certs:ro"
|
||||
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
|
||||
links:
|
||||
- nginx
|
||||
letsencrypt-nginx-proxy-companion:
|
||||
restart: unless-stopped
|
||||
image: jrcs/letsencrypt-nginx-proxy-companion
|
||||
container_name: letsencrypt-nginx-proxy-companion
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
- "nginx_conf:/etc/nginx/conf.d"
|
||||
- "nginx_vhost:/etc/nginx/vhost.d"
|
||||
- "nginx_html:/usr/share/nginx/html"
|
||||
- "nginx_certs:/etc/nginx/certs:rw"
|
||||
environment:
|
||||
NGINX_DOCKER_GEN_CONTAINER: "nginx-gen"
|
||||
NGINX_PROXY_CONTAINER: "nginx"
|
||||
ACME_CA_URI: ${ACME_CA_URI:-https://acme-staging.api.letsencrypt.org/directory}
|
||||
links:
|
||||
- nginx-gen
|
||||
btcpayserver:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/btcpayserver:1.0.2.105
|
||||
expose:
|
||||
- "49392"
|
||||
environment:
|
||||
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_BIND: 0.0.0.0:49392
|
||||
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
|
||||
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
|
||||
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
|
||||
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
|
||||
VIRTUAL_NETWORK: nginx-proxy
|
||||
VIRTUAL_PORT: 49392
|
||||
VIRTUAL_HOST: ${BTCPAY_HOST}
|
||||
SSL_POLICY: Mozilla-Modern
|
||||
LETSENCRYPT_HOST: ${BTCPAY_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
BTCPAY_CHAINS: "btc"
|
||||
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
|
||||
BTCPAY_BTCLIGHTNING: "type=clightning;server=unix://etc/clightning_bitcoin/lightning-rpc"
|
||||
links:
|
||||
- nbxplorer
|
||||
- postgres
|
||||
- clightning_bitcoin
|
||||
volumes:
|
||||
- "btcpay_datadir:/datadir"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
- "clightning_bitcoin_datadir:/etc/clightning_bitcoin"
|
||||
nbxplorer:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/nbxplorer:1.0.2.31
|
||||
expose:
|
||||
- "32838"
|
||||
environment:
|
||||
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
NBXPLORER_BIND: 0.0.0.0:32838
|
||||
NBXPLORER_CHAINS: "btc"
|
||||
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
|
||||
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
|
||||
volumes:
|
||||
- "nbxplorer_datadir:/datadir"
|
||||
- "bitcoin_datadir:/root/.bitcoin"
|
||||
links:
|
||||
- bitcoind
|
||||
postgres:
|
||||
restart: unless-stopped
|
||||
image: postgres:9.6.5
|
||||
volumes:
|
||||
- "postgres_datadir:/var/lib/postgresql/data"
|
||||
bitcoind:
|
||||
restart: unless-stopped
|
||||
container_name: btcpayserver_bitcoind
|
||||
image: nicolasdorier/docker-bitcoin:0.16.3
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
rpcport=43782
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
volumes:
|
||||
- "bitcoin_datadir:/data"
|
||||
clightning_bitcoin:
|
||||
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
|
||||
container_name: btcpayserver_clightning_bitcoin
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
LIGHTNINGD_CHAIN: btc
|
||||
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
|
||||
LIGHTNINGD_OPT: |
|
||||
bitcoin-datadir=/etc/bitcoin
|
||||
bitcoin-rpcconnect=bitcoind
|
||||
announce-addr=${BTCPAY_HOST}:9735
|
||||
bind-addr=0.0.0.0:9735
|
||||
network=${NBITCOIN_NETWORK:-regtest}
|
||||
alias=${LIGHTNING_ALIAS}
|
||||
chain=btc
|
||||
volumes:
|
||||
- "clightning_bitcoin_datadir:/root/.lightning"
|
||||
- "bitcoin_datadir:/etc/bitcoin"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
ports:
|
||||
- "9735:9735"
|
||||
links:
|
||||
- nbxplorer
|
||||
- bitcoind
|
||||
volumes:
|
||||
nginx_conf:
|
||||
nginx_vhost:
|
||||
nginx_html:
|
||||
nginx_certs:
|
||||
postgres_datadir:
|
||||
btcpay_datadir:
|
||||
nbxplorer_datadir:
|
||||
bitcoin_datadir:
|
||||
clightning_bitcoin_datadir:
|
||||
@@ -1,4 +1,5 @@
|
||||
version: "3"
|
||||
# DO NOT USE THOSE ARE DEPRECATED
|
||||
services:
|
||||
nginx:
|
||||
restart: unless-stopped
|
||||
@@ -46,7 +47,7 @@ services:
|
||||
- nginx-gen
|
||||
btcpayserver:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/btcpayserver:1.0.2.105
|
||||
image: nicolasdorier/btcpayserver:1.0.2.106
|
||||
expose:
|
||||
- "49392"
|
||||
environment:
|
||||
@@ -112,14 +113,18 @@ services:
|
||||
rpcport=43782
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
zmqpubrawblock=tcp://0.0.0.0:28332
|
||||
zmqpubrawtx=tcp://0.0.0.0:28333
|
||||
whitelist=0.0.0.0/0
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
- "28332"
|
||||
- "28333"
|
||||
volumes:
|
||||
- "litecoin_datadir:/data"
|
||||
clightning_litecoin:
|
||||
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
|
||||
image: nicolasdorier/clightning:v0.6.1
|
||||
container_name: btcpayserver_clightning_litecoin
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
@@ -153,13 +158,17 @@ services:
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
zmqpubrawblock=tcp://0.0.0.0:28332
|
||||
zmqpubrawtx=tcp://0.0.0.0:28333
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
- "28332"
|
||||
- "28333"
|
||||
volumes:
|
||||
- "bitcoin_datadir:/data"
|
||||
clightning_bitcoin:
|
||||
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
|
||||
image: nicolasdorier/clightning:v0.6.1
|
||||
container_name: btcpayserver_clightning_bitcoin
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
version: "3"
|
||||
# DO NOT USE THOSE ARE DEPRECATED
|
||||
services:
|
||||
nginx:
|
||||
restart: unless-stopped
|
||||
@@ -46,7 +47,7 @@ services:
|
||||
- nginx-gen
|
||||
btcpayserver:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/btcpayserver:1.0.2.105
|
||||
image: nicolasdorier/btcpayserver:1.0.2.106
|
||||
expose:
|
||||
- "49392"
|
||||
environment:
|
||||
@@ -106,10 +107,14 @@ services:
|
||||
rpcport=43782
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
zmqpubrawblock=tcp://0.0.0.0:28332
|
||||
zmqpubrawtx=tcp://0.0.0.0:28333
|
||||
whitelist=0.0.0.0/0
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
- "28332"
|
||||
- "28333"
|
||||
volumes:
|
||||
- "litecoin_datadir:/data"
|
||||
bitcoind:
|
||||
@@ -122,9 +127,13 @@ services:
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
zmqpubrawblock=tcp://0.0.0.0:28332
|
||||
zmqpubrawtx=tcp://0.0.0.0:28333
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
- "28332"
|
||||
- "28333"
|
||||
volumes:
|
||||
- "bitcoin_datadir:/data"
|
||||
volumes:
|
||||
|
||||
@@ -46,7 +46,7 @@ services:
|
||||
- nginx-gen
|
||||
btcpayserver:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/btcpayserver:1.0.2.105
|
||||
image: nicolasdorier/btcpayserver:1.0.2.106
|
||||
expose:
|
||||
- "49392"
|
||||
environment:
|
||||
@@ -102,9 +102,13 @@ services:
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
zmqpubrawblock=tcp://0.0.0.0:28332
|
||||
zmqpubrawtx=tcp://0.0.0.0:28333
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
- "28332"
|
||||
- "28333"
|
||||
volumes:
|
||||
- "bitcoin_datadir:/data"
|
||||
volumes:
|
||||
|
||||
@@ -1,147 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
nginx:
|
||||
restart: unless-stopped
|
||||
image: nginx:stable
|
||||
container_name: nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- "nginx_conf:/etc/nginx/conf.d"
|
||||
- "nginx_vhost:/etc/nginx/vhost.d"
|
||||
- "nginx_html:/usr/share/nginx/html"
|
||||
- "nginx_certs:/etc/nginx/certs:ro"
|
||||
links:
|
||||
- btcpayserver
|
||||
nginx-gen:
|
||||
restart: unless-stopped
|
||||
image: jwilder/docker-gen
|
||||
container_name: nginx-gen
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/tmp/docker.sock:ro"
|
||||
- "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
|
||||
- "nginx_conf:/etc/nginx/conf.d"
|
||||
- "nginx_vhost:/etc/nginx/vhost.d"
|
||||
- "nginx_html:/usr/share/nginx/html"
|
||||
- "nginx_certs:/etc/nginx/certs:ro"
|
||||
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
|
||||
links:
|
||||
- nginx
|
||||
letsencrypt-nginx-proxy-companion:
|
||||
restart: unless-stopped
|
||||
image: jrcs/letsencrypt-nginx-proxy-companion
|
||||
container_name: letsencrypt-nginx-proxy-companion
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
- "nginx_conf:/etc/nginx/conf.d"
|
||||
- "nginx_vhost:/etc/nginx/vhost.d"
|
||||
- "nginx_html:/usr/share/nginx/html"
|
||||
- "nginx_certs:/etc/nginx/certs:rw"
|
||||
environment:
|
||||
NGINX_DOCKER_GEN_CONTAINER: "nginx-gen"
|
||||
NGINX_PROXY_CONTAINER: "nginx"
|
||||
ACME_CA_URI: ${ACME_CA_URI:-https://acme-staging.api.letsencrypt.org/directory}
|
||||
links:
|
||||
- nginx-gen
|
||||
btcpayserver:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/btcpayserver:1.0.2.105
|
||||
expose:
|
||||
- "49392"
|
||||
environment:
|
||||
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_BIND: 0.0.0.0:49392
|
||||
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
|
||||
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
|
||||
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
|
||||
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
|
||||
VIRTUAL_NETWORK: nginx-proxy
|
||||
VIRTUAL_PORT: 49392
|
||||
VIRTUAL_HOST: ${BTCPAY_HOST}
|
||||
SSL_POLICY: Mozilla-Modern
|
||||
LETSENCRYPT_HOST: ${BTCPAY_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
|
||||
BTCPAY_CHAINS: "ltc"
|
||||
BTCPAY_LTCLIGHTNING: "type=clightning;server=unix://etc/clightning_litecoin/lightning-rpc"
|
||||
links:
|
||||
- nbxplorer
|
||||
- postgres
|
||||
- clightning_litecoin
|
||||
volumes:
|
||||
- "btcpay_datadir:/datadir"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
- "clightning_litecoin_datadir:/etc/clightning_litecoin"
|
||||
nbxplorer:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/nbxplorer:1.0.2.31
|
||||
expose:
|
||||
- "32838"
|
||||
environment:
|
||||
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
NBXPLORER_BIND: 0.0.0.0:32838
|
||||
NBXPLORER_CHAINS: "ltc"
|
||||
NBXPLORER_LTCRPCURL: http://litecoind:43782/
|
||||
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
|
||||
volumes:
|
||||
- "nbxplorer_datadir:/datadir"
|
||||
- "litecoin_datadir:/root/.litecoin"
|
||||
links:
|
||||
- litecoind
|
||||
postgres:
|
||||
restart: unless-stopped
|
||||
image: postgres:9.6.5
|
||||
volumes:
|
||||
- "postgres_datadir:/var/lib/postgresql/data"
|
||||
litecoind:
|
||||
restart: unless-stopped
|
||||
container_name: btcpayserver_litecoind
|
||||
image: nicolasdorier/docker-litecoin:0.16.3
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
rpcport=43782
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
volumes:
|
||||
- "litecoin_datadir:/data"
|
||||
clightning_litecoin:
|
||||
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
|
||||
container_name: btcpayserver_clightning_litecoin
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
LIGHTNINGD_CHAIN: ltc
|
||||
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
|
||||
LIGHTNINGD_OPT: |
|
||||
bitcoin-datadir=/etc/litecoin
|
||||
bitcoin-rpcconnect=litecoind
|
||||
bind-addr=0.0.0.0:9735
|
||||
announce-addr=${BTCPAY_HOST}:9736
|
||||
network=${NBITCOIN_NETWORK:-regtest}
|
||||
alias=${LIGHTNING_ALIAS}
|
||||
chain=ltc
|
||||
volumes:
|
||||
- "clightning_litecoin_datadir:/root/.lightning"
|
||||
- "litecoin_datadir:/etc/litecoin"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
ports:
|
||||
- "9736:9735"
|
||||
links:
|
||||
- nbxplorer
|
||||
- litecoind
|
||||
volumes:
|
||||
nginx_conf:
|
||||
nginx_vhost:
|
||||
nginx_html:
|
||||
nginx_certs:
|
||||
postgres_datadir:
|
||||
btcpay_datadir:
|
||||
nbxplorer_datadir:
|
||||
litecoin_datadir:
|
||||
clightning_litecoin_datadir:
|
||||
@@ -1,118 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
nginx:
|
||||
restart: unless-stopped
|
||||
image: nginx:stable
|
||||
container_name: nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- "nginx_conf:/etc/nginx/conf.d"
|
||||
- "nginx_vhost:/etc/nginx/vhost.d"
|
||||
- "nginx_html:/usr/share/nginx/html"
|
||||
- "nginx_certs:/etc/nginx/certs:ro"
|
||||
links:
|
||||
- btcpayserver
|
||||
nginx-gen:
|
||||
restart: unless-stopped
|
||||
image: jwilder/docker-gen
|
||||
container_name: nginx-gen
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/tmp/docker.sock:ro"
|
||||
- "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
|
||||
- "nginx_conf:/etc/nginx/conf.d"
|
||||
- "nginx_vhost:/etc/nginx/vhost.d"
|
||||
- "nginx_html:/usr/share/nginx/html"
|
||||
- "nginx_certs:/etc/nginx/certs:ro"
|
||||
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
|
||||
links:
|
||||
- nginx
|
||||
letsencrypt-nginx-proxy-companion:
|
||||
restart: unless-stopped
|
||||
image: jrcs/letsencrypt-nginx-proxy-companion
|
||||
container_name: letsencrypt-nginx-proxy-companion
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
- "nginx_conf:/etc/nginx/conf.d"
|
||||
- "nginx_vhost:/etc/nginx/vhost.d"
|
||||
- "nginx_html:/usr/share/nginx/html"
|
||||
- "nginx_certs:/etc/nginx/certs:rw"
|
||||
environment:
|
||||
NGINX_DOCKER_GEN_CONTAINER: "nginx-gen"
|
||||
NGINX_PROXY_CONTAINER: "nginx"
|
||||
ACME_CA_URI: ${ACME_CA_URI:-https://acme-staging.api.letsencrypt.org/directory}
|
||||
links:
|
||||
- nginx-gen
|
||||
btcpayserver:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/btcpayserver:1.0.2.105
|
||||
expose:
|
||||
- "49392"
|
||||
environment:
|
||||
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
BTCPAY_BIND: 0.0.0.0:49392
|
||||
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
|
||||
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
|
||||
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
|
||||
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
|
||||
VIRTUAL_NETWORK: nginx-proxy
|
||||
VIRTUAL_PORT: 49392
|
||||
VIRTUAL_HOST: ${BTCPAY_HOST}
|
||||
SSL_POLICY: Mozilla-Modern
|
||||
LETSENCRYPT_HOST: ${BTCPAY_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
|
||||
BTCPAY_CHAINS: "ltc"
|
||||
links:
|
||||
- nbxplorer
|
||||
- postgres
|
||||
volumes:
|
||||
- "btcpay_datadir:/datadir"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
nbxplorer:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/nbxplorer:1.0.2.31
|
||||
expose:
|
||||
- "32838"
|
||||
environment:
|
||||
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
NBXPLORER_BIND: 0.0.0.0:32838
|
||||
NBXPLORER_CHAINS: "ltc"
|
||||
NBXPLORER_LTCRPCURL: http://litecoind:43782/
|
||||
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
|
||||
volumes:
|
||||
- "nbxplorer_datadir:/datadir"
|
||||
- "litecoin_datadir:/root/.litecoin"
|
||||
links:
|
||||
- litecoind
|
||||
postgres:
|
||||
restart: unless-stopped
|
||||
image: postgres:9.6.5
|
||||
volumes:
|
||||
- "postgres_datadir:/var/lib/postgresql/data"
|
||||
litecoind:
|
||||
restart: unless-stopped
|
||||
container_name: btcpayserver_litecoind
|
||||
image: nicolasdorier/docker-litecoin:0.16.3
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
rpcport=43782
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
expose:
|
||||
- "43782"
|
||||
- "39388"
|
||||
volumes:
|
||||
- "litecoin_datadir:/data"
|
||||
volumes:
|
||||
nginx_conf:
|
||||
nginx_vhost:
|
||||
nginx_html:
|
||||
nginx_certs:
|
||||
postgres_datadir:
|
||||
btcpay_datadir:
|
||||
nbxplorer_datadir:
|
||||
litecoin_datadir:
|
||||
@@ -296,13 +296,17 @@ server {
|
||||
{{ else if (exists "/etc/nginx/vhost.d/default_location") }}
|
||||
include /etc/nginx/vhost.d/default_location;
|
||||
{{ end }}
|
||||
}
|
||||
}
|
||||
|
||||
{{ range $container := $ }}
|
||||
{{ $serviceName := (index $container.Labels "com.docker.compose.service") }}
|
||||
{{ if (eq $serviceName "lnd_bitcoin") }}
|
||||
location /lnrpc.Lightning {
|
||||
grpc_pass grpcs://lnd_bitcoin:10009;
|
||||
grpc_pass grpcs://lnd_bitcoin:10009;
|
||||
}
|
||||
location /lnd-rest/btc/ {
|
||||
rewrite ^/lnd-rest/btc/(.*) /$1 break;
|
||||
proxy_pass http://lnd_bitcoin:8080/;
|
||||
}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
30
README.md
30
README.md
@@ -115,7 +115,7 @@ You can read [the article](https://medium.com/@BtcpayServer/hosting-btcpay-serve
|
||||
* `BTCPAYGEN_CRYPTO1`: First supported crypto currency (eg. `btc`, `ltc`. Default: `btc`)
|
||||
* `BTCPAYGEN_CRYPTO2`: Second supported crypto currency (eg. `btc`, `ltc`. Default: `(empty)`)
|
||||
* `BTCPAYGEN_CRYPTON`: N'th supported crypto currency where N is 9 at maximum. (eg. `btc`, `ltc`. Default: `(empty)`)
|
||||
* `BTCPAYGEN_REVERSEPROXY`: Specify reverse proxy to use; NGinx has HTTPS support. (eg. `nginx`, `(empty)`. Default: `nginx`)
|
||||
* `BTCPAYGEN_REVERSEPROXY`: Specify reverse proxy to use; NGinx has HTTPS support. (eg. `nginx`, `traefik`, `(empty)`. Default: `nginx`)
|
||||
* `BTCPAYGEN_LIGHTNING`: Lightning network implementation to use (eg. `clightning`, `(empty)`)
|
||||
* `BTCPAYGEN_SUBNAME`: The subname of the generated docker-compose file, where the full name is `Generated/docker-compose.SUBNAME.yml` (Default: `generated`)
|
||||
* `BTCPAYGEN_ADDITIONAL_FRAGMENTS`: Semicolon-separated list of additional fragments you want to use (eg. `opt-save-storage`)
|
||||
@@ -123,6 +123,7 @@ You can read [the article](https://medium.com/@BtcpayServer/hosting-btcpay-serve
|
||||
* `ACME_CA_URI`: The API endpoint to ask for HTTPS certificate (Default: `https://acme-v01.api.letsencrypt.org/directory`)
|
||||
* `BTCPAY_HOST_SSHKEYFILE`: Optional, SSH private key that BTCPay can use to connect to this VM's SSH server. This key will be copied to BTCPay's data directory
|
||||
* `BTCPAY_SSHTRUSTEDFINGERPRINTS`: Optional, BTCPay will ensure that it is connecting to the expected SSH server by checking the host's public key against these fingerprints
|
||||
* `BTCPAYGEN_DOCKER_IMAGE`: Optional, Specify which generator image to use if you have customized the C# generator. Set to `btcpayserver/docker-compose-generator:local` to build the generator locally at runtime.
|
||||
|
||||
# Tooling
|
||||
|
||||
@@ -270,19 +271,23 @@ BTCPAY_SSHKEYFILE=/datadir/id_rsa
|
||||
1. Add support for your crypto to [NBitcoin](https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.Altcoins), [NBxplorer](https://github.com/dgarage/NBXplorer), and [BTCPayServer](https://github.com/btcpayserver/btcpayserver). (Use examples from other coins)
|
||||
2. Create your own docker image ([Example for BTC](https://hub.docker.com/r/nicolasdorier/docker-bitcoin/))
|
||||
3. Create a docker-compose fragment ([Example for BTC](docker-compose-generator/docker-fragments/bitcoin.yml))
|
||||
4. Add your CryptoDefinition ([Example for BTC](docker-compose-generator/src/CryptoDefinition.cs))
|
||||
4. Add your `CryptoDefinition` ([Example for BTC](docker-compose-generator/src/CryptoDefinition.cs))
|
||||
|
||||
When testing your coin, **DO NOT USE `build.sh`**, since it uses a pre-built docker image.
|
||||
|
||||
Instead, install [.NET Core 2.1 SDK](https://www.microsoft.com/net/download/windows) and run:
|
||||
`build.sh` is using a pre-built image of the `docker-compose generator` on [docker hub](https://hub.docker.com/r/btcpayserver/docker-compose-generator/).
|
||||
If you modify the code source of `docker-compose generator` (for example, the `CryptoDefinition` [Example for BTC](docker-compose-generator/src/CryptoDefinition.cs)), you need to configure `build.sh` to use your own image by setting the environment variable `BTCPAYGEN_DOCKER_IMAGE` to `btcpayserver/docker-compose-generator:local`.
|
||||
|
||||
```bash
|
||||
BTCPAYGEN_CRYPTO1="EXAMPLE-COIN"
|
||||
BTCPAYGEN_SUBNAME="test"
|
||||
cd docker-compose-generator/src
|
||||
dotnet run
|
||||
cd docker-compose-generator
|
||||
BTCPAYGEN_DOCKER_IMAGE="btcpayserver/docker-compose-generator:local"
|
||||
```
|
||||
|
||||
Or on powershell:
|
||||
```powershell
|
||||
cd docker-compose-generator
|
||||
$BTCPAYGEN_DOCKER_IMAGE="btcpayserver/docker-compose-generator:local"
|
||||
```
|
||||
|
||||
Then run `./build.sh` or `. .\build.ps1`.
|
||||
This will generate your docker-compose in the `Generated` folder, which you can then run and test.
|
||||
|
||||
Note that BTCPayServer developers will not spend excessive time testing your image, so make sure it works.
|
||||
@@ -306,9 +311,14 @@ Yes, run the following commands to update:
|
||||
```bash
|
||||
sudo su -
|
||||
|
||||
btcpay-update.sh
|
||||
cd $DOWNLOAD_ROOT/btcpayserver-docker
|
||||
git checkout master
|
||||
git pull
|
||||
git checkout 9acb5d8067cb5c46f59858137feb699b41ac9f19
|
||||
btcpay-update.sh
|
||||
. ./btcpay-setup.sh -i
|
||||
git checkout master
|
||||
btcpay-update.sh
|
||||
|
||||
exit
|
||||
```
|
||||
|
||||
BIN
Traefik/Production.png
Normal file
BIN
Traefik/Production.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
17
Traefik/README.md
Normal file
17
Traefik/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# How to use docker-compose with Traefik
|
||||
|
||||
Traefik is a modern reverse proxy aimed towards applications running through container orchestrators.
|
||||
|
||||
Some of the benefits of using Traefik over NGinx are:
|
||||
* Real-time configuration changes - no need to reload the proxy
|
||||
* Auto discovery and configuration of services through a vast amount of container orchestrators.
|
||||
* Built-in official support for Let's Encrypt SSL with certificate auto-renewal
|
||||
|
||||
## Traefik Specific Environment Variables
|
||||
|
||||
* `BTCPAYGEN_REVERSEPROXY` to `traefik`.
|
||||
* `LETSENCRYPT_EMAIL`: Optional, The email Let's Encrypt will use to notify you about certificate expiration.
|
||||
* `BTCPAYGEN_ADDITIONAL_FRAGMENTS`: In the case that you have an already deployed traefik container, you can use the fragment `traefik-labels` which will tag the btcpayserver service with the needed labels to be discovered.
|
||||
|
||||
|
||||

|
||||
34
Traefik/traefik.toml
Normal file
34
Traefik/traefik.toml
Normal file
@@ -0,0 +1,34 @@
|
||||
defaultEntryPoints = ["https","http"]
|
||||
|
||||
logLevel = "ERROR"
|
||||
|
||||
[entryPoints]
|
||||
[entryPoints.http]
|
||||
address = ":80"
|
||||
[entryPoints.http.redirect]
|
||||
entryPoint = "https"
|
||||
[entryPoints.https]
|
||||
address = ":443"
|
||||
[entryPoints.https.tls]
|
||||
|
||||
[retry]
|
||||
|
||||
[docker]
|
||||
endpoint = "unix:///var/run/docker.sock"
|
||||
watch = true
|
||||
exposedByDefault = false
|
||||
|
||||
[acme]
|
||||
storage = "acme.json"
|
||||
entryPoint = "https"
|
||||
onHostRule = true
|
||||
[acme.httpChallenge]
|
||||
entryPoint = "http"
|
||||
|
||||
[traefikLog]
|
||||
filePath = "/traefik_logs/traefik.log"
|
||||
format = "json"
|
||||
|
||||
[accessLog]
|
||||
filePath = "/traefik_logs/access.log"
|
||||
format = "json"
|
||||
@@ -1 +1 @@
|
||||
docker exec -ti btcpayserver_lnd_bitcoin lncli $args
|
||||
docker exec -ti btcpayserver_lnd_bitcoin lncli --macaroonpath /root/.lnd/admin.macaroon $args
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker exec -ti btcpayserver_lnd_bitcoin lncli "$@"
|
||||
docker exec -ti btcpayserver_lnd_bitcoin lncli --macaroonpath /root/.lnd/admin.macaroon "$@"
|
||||
|
||||
@@ -55,12 +55,12 @@ Environment variables:
|
||||
BTCPAYGEN_CRYPTO1: First supported crypto currency (eg. btc, ltc, btg, grs, ftc, via, none. Default: btc)
|
||||
BTCPAYGEN_CRYPTO2: Second supported crypto currency (Default: empty)
|
||||
BTCPAYGEN_CRYPTON: N th supported crypto currency where N is maximum at maximum 9. (Default: none)
|
||||
BTCPAYGEN_REVERSEPROXY: Whether to use or not a reverse proxy. NGinx setup HTTPS for you. (eg. nginx, none. Default: nginx)
|
||||
BTCPAYGEN_REVERSEPROXY: Whether to use or not a reverse proxy. NGinx setup HTTPS for you. (eg. nginx, traefik, none. Default: nginx)
|
||||
BTCPAYGEN_LIGHTNING: Lightning network implementation to use (eg. clightning, lnd, none)
|
||||
BTCPAYGEN_ADDITIONAL_FRAGMENTS: Semi colon separated list of additional fragments you want to use (eg. opt-save-storage)
|
||||
ACME_CA_URI: The API endpoint to ask for HTTPS certificate (default: https://acme-v01.api.letsencrypt.org/directory)
|
||||
BTCPAY_HOST_SSHKEYFILE: Optional, SSH private key that BTCPay can use to connect to this VM's SSH server. This key will be copied on BTCPay's data directory
|
||||
|
||||
BTCPAYGEN_DOCKER_IMAGE: Allows you to specify a custom docker image for the generator (Default: btcpayserver/docker-compose-generator)
|
||||
END
|
||||
}
|
||||
|
||||
@@ -71,53 +71,8 @@ fi
|
||||
|
||||
######### Migration: old pregen environment to new environment ############
|
||||
if [ ! -z $BTCPAY_DOCKER_COMPOSE ] && [ ! -z $DOWNLOAD_ROOT ] && [ -z $BTCPAYGEN_OLD_PREGEN ]; then
|
||||
echo "Old pregen docker deployment detected. Migrating..."
|
||||
rm "$DOWNLOAD_ROOT/btcpay-restart.sh"
|
||||
rm "$DOWNLOAD_ROOT/btcpay-update.sh"
|
||||
rm "$DOWNLOAD_ROOT/changedomain.sh"
|
||||
rm "$DOWNLOAD_ROOT/entrypoint.sh"
|
||||
DOWNLOAD_ROOT=""
|
||||
BTCPAYGEN_OLD_PREGEN="true"
|
||||
# Migration: old deployment store those in BTCPAY_ENV_FILE
|
||||
BTCPAY_HOST=$(cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_HOST=\(.*\)$/\1/p')
|
||||
ACME_CA_URI=$(cat $BTCPAY_ENV_FILE | sed -n 's/^ACME_CA_URI=\(.*\)$/\1/p')
|
||||
NBITCOIN_NETWORK=$(cat $BTCPAY_ENV_FILE | sed -n 's/^NBITCOIN_NETWORK=\(.*\)$/\1/p')
|
||||
LETSENCRYPT_EMAIL=$(cat $BTCPAY_ENV_FILE | sed -n 's/^LETSENCRYPT_EMAIL=\(.*\)$/\1/p')
|
||||
LIGHTNING_ALIAS=$(cat $BTCPAY_ENV_FILE | sed -n 's/^LIGHTNING_ALIAS=\(.*\)$/\1/p')
|
||||
|
||||
if [[ $(dirname $BTCPAY_DOCKER_COMPOSE) == *Production ]]; then
|
||||
BTCPAYGEN_REVERSEPROXY='nginx'
|
||||
fi
|
||||
if [[ $(dirname $BTCPAY_DOCKER_COMPOSE) == *Production-NoReverseProxy ]]; then
|
||||
BTCPAYGEN_REVERSEPROXY='none'
|
||||
fi
|
||||
|
||||
if [[ $BTCPAY_DOCKER_COMPOSE == *docker-compose.btc.yml ]]; then
|
||||
BTCPAYGEN_CRYPTO1='btc'
|
||||
BTCPAYGEN_LIGHTNING='none'
|
||||
fi
|
||||
if [[ $BTCPAY_DOCKER_COMPOSE == *docker-compose.btc-clightning.yml ]]; then
|
||||
BTCPAYGEN_CRYPTO1='btc'
|
||||
BTCPAYGEN_LIGHTNING='clightning'
|
||||
fi
|
||||
if [[ $BTCPAY_DOCKER_COMPOSE == *docker-compose.ltc.yml ]]; then
|
||||
BTCPAYGEN_CRYPTO1='ltc'
|
||||
BTCPAYGEN_LIGHTNING='none'
|
||||
fi
|
||||
if [[ $BTCPAY_DOCKER_COMPOSE == *docker-compose.ltc-clightning.yml ]]; then
|
||||
BTCPAYGEN_CRYPTO1='ltc'
|
||||
BTCPAYGEN_LIGHTNING='clightning'
|
||||
fi
|
||||
if [[ $BTCPAY_DOCKER_COMPOSE == *docker-compose.btc-ltc.yml ]]; then
|
||||
BTCPAYGEN_CRYPTO1='btc'
|
||||
BTCPAYGEN_CRYPTO2='ltc'
|
||||
BTCPAYGEN_LIGHTNING='none'
|
||||
fi
|
||||
if [[ $BTCPAY_DOCKER_COMPOSE == *docker-compose.btc-ltc-clightning.yml ]]; then
|
||||
BTCPAYGEN_CRYPTO1='btc'
|
||||
BTCPAYGEN_CRYPTO2='ltc'
|
||||
BTCPAYGEN_LIGHTNING='clightning'
|
||||
fi
|
||||
echo "Your deployment is too old, you need to migrate by following instructions on this link https://github.com/btcpayserver/btcpayserver-docker/tree/master#i-deployed-before-btcpay-setupsh-existed-before-may-17-can-i-migrate-to-this-new-system"
|
||||
return
|
||||
fi
|
||||
#########################################################
|
||||
|
||||
@@ -208,6 +163,7 @@ fi
|
||||
# Put the variables in /etc/profile.d when a user log interactively
|
||||
touch "/etc/profile.d/btcpay-env.sh"
|
||||
echo "
|
||||
export COMPOSE_HTTP_TIMEOUT=\"180\"
|
||||
export BTCPAYGEN_OLD_PREGEN=\"$BTCPAYGEN_OLD_PREGEN\"
|
||||
export BTCPAYGEN_CRYPTO1=\"$BTCPAYGEN_CRYPTO1\"
|
||||
export BTCPAYGEN_CRYPTO2=\"$BTCPAYGEN_CRYPTO2\"
|
||||
|
||||
@@ -4,15 +4,28 @@ set -e
|
||||
|
||||
. /etc/profile.d/btcpay-env.sh
|
||||
|
||||
if [ ! -z $BTCPAY_DOCKER_COMPOSE ] && [ ! -z $DOWNLOAD_ROOT ] && [ -z $BTCPAYGEN_OLD_PREGEN ]; then
|
||||
echo "Your deployment is too old, you need to migrate by following instructions on this link https://github.com/btcpayserver/btcpayserver-docker/tree/master#i-deployed-before-btcpay-setupsh-existed-before-may-17-can-i-migrate-to-this-new-system"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ $BTCPAY_DOCKER_COMPOSE != *docker-compose.generated.yml ]]; then
|
||||
echo "Your deployment is too old, you need to migrate by following instructions on this link https://github.com/btcpayserver/btcpayserver-docker/tree/master#i-deployed-before-btcpay-setupsh-existed-before-may-17-can-i-migrate-to-this-new-system"
|
||||
exit
|
||||
fi
|
||||
|
||||
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
|
||||
git pull --force
|
||||
|
||||
if [[ $BTCPAY_DOCKER_COMPOSE == *docker-compose.generated.yml ]]; then
|
||||
# Generate the docker compose in BTCPAY_DOCKER_COMPOSE
|
||||
. ./build.sh
|
||||
if [ "$BTCPAYGEN_OLD_PREGEN" == "true" ]; then
|
||||
cp Generated/docker-compose.generated.yml $BTCPAY_DOCKER_COMPOSE
|
||||
fi
|
||||
. ./build.sh
|
||||
if [ "$BTCPAYGEN_OLD_PREGEN" == "true" ]; then
|
||||
cp Generated/docker-compose.generated.yml $BTCPAY_DOCKER_COMPOSE
|
||||
fi
|
||||
|
||||
if ! grep -Fxq "export COMPOSE_HTTP_TIMEOUT=\"180\"" "/etc/profile.d/btcpay-env.sh"; then
|
||||
echo "export COMPOSE_HTTP_TIMEOUT=\"180\"" >> /etc/profile.d/btcpay-env.sh
|
||||
export COMPOSE_HTTP_TIMEOUT=180
|
||||
echo "Adding COMPOSE_HTTP_TIMEOUT=180 in btcpay-env.sh"
|
||||
fi
|
||||
|
||||
for scriptname in *.sh; do
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
# This script will run docker-compose-generator in a container to generate the yml files
|
||||
|
||||
docker pull btcpayserver/docker-compose-generator
|
||||
docker run -v "$(Get-Location)\Production:/app/Production" `
|
||||
-v "$(Get-Location)\Production-NoReverseProxy:/app/Production-NoReverseProxy" `
|
||||
-v "$(Get-Location)\docker-compose-generator\docker-fragments:/app/docker-fragments" `
|
||||
--rm btcpayserver/docker-compose-generator pregen
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script will run docker-compose-generator in a container to generate the yml files
|
||||
docker pull btcpayserver/docker-compose-generator
|
||||
docker run -v "$(pwd)/Production:/app/Production" \
|
||||
-v "$(pwd)/Production-NoReverseProxy:/app/Production-NoReverseProxy" \
|
||||
-v "$(pwd)/docker-compose-generator/docker-fragments:/app/docker-fragments" \
|
||||
--rm btcpayserver/docker-compose-generator pregen
|
||||
16
build.ps1
16
build.ps1
@@ -1,7 +1,13 @@
|
||||
# This script will run docker-compose-generator in a container to generate the yml files
|
||||
if (-not ($BTCPAYGEN_DOCKER_IMAGE)) { $BTCPAYGEN_DOCKER_IMAGE = "btcpayserver/docker-compose-generator" }
|
||||
|
||||
docker pull $BTCPAYGEN_DOCKER_IMAGE:
|
||||
If (-not ($BTCPAYGEN_DOCKER_IMAGE)) { $BTCPAYGEN_DOCKER_IMAGE = "btcpayserver/docker-compose-generator" }
|
||||
|
||||
If ($BTCPAYGEN_DOCKER_IMAGE -eq "btcpayserver/docker-compose-generator:local"){
|
||||
docker build docker-compose-generator --tag $BTCPAYGEN_DOCKER_IMAGE
|
||||
} Else {
|
||||
docker pull $BTCPAYGEN_DOCKER_IMAGE
|
||||
}
|
||||
|
||||
docker run -v "$(Get-Location)\Generated:/app/Generated" `
|
||||
-v "$(Get-Location)\docker-compose-generator\docker-fragments:/app/docker-fragments" `
|
||||
-e "BTCPAYGEN_CRYPTO1=$BTCPAYGEN_CRYPTO1" `
|
||||
@@ -22,3 +28,9 @@ docker run -v "$(Get-Location)\Generated:/app/Generated" `
|
||||
If ($BTCPAYGEN_REVERSEPROXY -eq "nginx") {
|
||||
Copy-Item ".\Production\nginx.tmpl" -Destination ".\Generated"
|
||||
}
|
||||
|
||||
If ($BTCPAYGEN_REVERSEPROXY -eq "traefik") {
|
||||
Copy-Item ".\Traefik\traefik.toml" -Destination ".\Generated"
|
||||
|
||||
New-Item ".\Generated\acme.json" -type file
|
||||
}
|
||||
|
||||
17
build.sh
17
build.sh
@@ -1,7 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${BTCPAYGEN_DOCKER_IMAGE:=btcpayserver/docker-compose-generator}"
|
||||
if [ "$BTCPAYGEN_DOCKER_IMAGE" == "btcpayserver/docker-compose-generator:local" ]
|
||||
then
|
||||
docker build docker-compose-generator --tag $BTCPAYGEN_DOCKER_IMAGE
|
||||
else
|
||||
docker pull $BTCPAYGEN_DOCKER_IMAGE
|
||||
fi
|
||||
|
||||
# This script will run docker-compose-generator in a container to generate the yml files
|
||||
docker pull ${BTCPAYGEN_DOCKER_IMAGE:-"btcpayserver/docker-compose-generator"}
|
||||
docker run -v "$(pwd)/Generated:/app/Generated" \
|
||||
-v "$(pwd)/docker-compose-generator/docker-fragments:/app/docker-fragments" \
|
||||
-e "BTCPAYGEN_CRYPTO1=$BTCPAYGEN_CRYPTO1" \
|
||||
@@ -17,8 +24,14 @@ docker run -v "$(pwd)/Generated:/app/Generated" \
|
||||
-e "BTCPAYGEN_ADDITIONAL_FRAGMENTS=$BTCPAYGEN_ADDITIONAL_FRAGMENTS" \
|
||||
-e "BTCPAYGEN_LIGHTNING=$BTCPAYGEN_LIGHTNING" \
|
||||
-e "BTCPAYGEN_SUBNAME=$BTCPAYGEN_SUBNAME" \
|
||||
--rm ${BTCPAYGEN_DOCKER_IMAGE:-"btcpayserver/docker-compose-generator"}
|
||||
--rm $BTCPAYGEN_DOCKER_IMAGE
|
||||
|
||||
if [ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]; then
|
||||
cp Production/nginx.tmpl Generated/nginx.tmpl
|
||||
fi
|
||||
|
||||
if [ "$BTCPAYGEN_REVERSEPROXY" == "traefik" ]; then
|
||||
cp Traefik/traefik.toml Generated/traefik.toml
|
||||
:> Generated/acme.json
|
||||
chmod 600 Generated/acme.json
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM microsoft/dotnet:2.1.300-sdk-alpine3.7 AS builder
|
||||
FROM microsoft/dotnet:2.1.403-sdk-alpine3.7 AS builder
|
||||
WORKDIR /source
|
||||
COPY src/docker-compose-generator.csproj docker-compose-generator.csproj
|
||||
# Cache some dependencies
|
||||
@@ -6,7 +6,7 @@ RUN dotnet restore
|
||||
COPY src/. .
|
||||
RUN dotnet publish --output /app/ --configuration Release
|
||||
|
||||
FROM microsoft/dotnet:2.1.0-runtime-alpine3.7
|
||||
FROM microsoft/dotnet:2.1.5-runtime-alpine3.7
|
||||
WORKDIR /app
|
||||
|
||||
RUN mkdir /datadir
|
||||
|
||||
@@ -2,7 +2,8 @@ version: "3"
|
||||
|
||||
services:
|
||||
clightning_bitcoin:
|
||||
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
|
||||
image: nicolasdorier/clightning:v0.6.2-3
|
||||
stop_signal: SIGKILL
|
||||
container_name: btcpayserver_clightning_bitcoin
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
|
||||
@@ -2,7 +2,7 @@ version: "3"
|
||||
|
||||
services:
|
||||
lnd_bitcoin:
|
||||
image: btcpayserver/lnd:0.4.2.0.1
|
||||
image: btcpayserver/lnd:0.5-beta-2
|
||||
container_name: btcpayserver_lnd_bitcoin
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
@@ -15,10 +15,12 @@ services:
|
||||
rpclisten=0.0.0.0:10009
|
||||
bitcoin.node=bitcoind
|
||||
bitcoind.rpchost=bitcoind:43782
|
||||
bitcoind.zmqpath=tcp://bitcoind:28332
|
||||
bitcoind.zmqpubrawblock=tcp://bitcoind:28332
|
||||
bitcoind.zmqpubrawtx=tcp://bitcoind:28333
|
||||
externalip=${BTCPAY_HOST}:9735
|
||||
alias=${LIGHTNING_ALIAS}
|
||||
noencryptwallet=1
|
||||
adminmacaroonpath=/data/admin.macaroon
|
||||
noseedbackup=1
|
||||
notls=1
|
||||
ports:
|
||||
- "9735:9735"
|
||||
@@ -37,6 +39,7 @@ services:
|
||||
environment:
|
||||
BTCPAY_BTCLIGHTNING: "type=lnd-rest;server=http://lnd_bitcoin:8080/;macaroonfilepath=/etc/lnd_bitcoin/admin.macaroon;allowinsecure=true"
|
||||
BTCPAY_BTCEXTERNALLNDGRPC: "type=lnd-grpc;server=${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/;macaroonfilepath=/etc/lnd_bitcoin/admin.macaroon"
|
||||
BTCPAY_BTCEXTERNALLNDREST: "type=lnd-rest;server=${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/lnd-rest/btc/;macaroonfilepath=/etc/lnd_bitcoin/admin.macaroon"
|
||||
volumes:
|
||||
- "lnd_bitcoin_datadir:/etc/lnd_bitcoin"
|
||||
links:
|
||||
@@ -45,8 +48,8 @@ services:
|
||||
bitcoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
zmqpubrawtx=tcp://0.0.0.0:28332
|
||||
zmqpubrawblock=tcp://0.0.0.0:28332
|
||||
zmqpubrawtx=tcp://0.0.0.0:28333
|
||||
expose:
|
||||
- "28332"
|
||||
- "28333"
|
||||
|
||||
@@ -4,11 +4,12 @@ services:
|
||||
bitcoind:
|
||||
restart: unless-stopped
|
||||
container_name: btcpayserver_bitcoind
|
||||
image: nicolasdorier/docker-bitcoin:0.16.3
|
||||
image: nicolasdorier/docker-bitcoin:0.17.0
|
||||
environment:
|
||||
BITCOIN_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
deprecatedrpc=signrawtransaction
|
||||
rpcport=43782
|
||||
${NBITCOIN_NETWORK:-regtest}=1
|
||||
port=39388
|
||||
whitelist=0.0.0.0/0
|
||||
expose:
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
|
||||
btcpayserver:
|
||||
environment:
|
||||
# NGINX settings
|
||||
VIRTUAL_NETWORK: nginx-proxy
|
||||
VIRTUAL_PORT: 49392
|
||||
VIRTUAL_HOST: ${BTCPAY_HOST}
|
||||
SSL_POLICY: Mozilla-Modern
|
||||
|
||||
# Let's encrypt settings
|
||||
LETSENCRYPT_HOST: ${BTCPAY_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
@@ -4,7 +4,7 @@ services:
|
||||
|
||||
btcpayserver:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/btcpayserver:1.0.2.105
|
||||
image: nicolasdorier/btcpayserver:1.0.3.8
|
||||
expose:
|
||||
- "49392"
|
||||
environment:
|
||||
@@ -16,17 +16,7 @@ services:
|
||||
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
|
||||
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
|
||||
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
|
||||
|
||||
# NGINX settings
|
||||
VIRTUAL_NETWORK: nginx-proxy
|
||||
VIRTUAL_PORT: 49392
|
||||
VIRTUAL_HOST: ${BTCPAY_HOST}
|
||||
SSL_POLICY: Mozilla-Modern
|
||||
|
||||
# Let's encrypt settings
|
||||
LETSENCRYPT_HOST: ${BTCPAY_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
|
||||
BTCPAY_DEBUGLOG: btcpay.log
|
||||
links:
|
||||
- nbxplorer
|
||||
- postgres
|
||||
@@ -34,24 +24,5 @@ services:
|
||||
- "btcpay_datadir:/datadir"
|
||||
- "nbxplorer_datadir:/root/.nbxplorer"
|
||||
|
||||
nbxplorer:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/nbxplorer:1.0.2.31
|
||||
expose:
|
||||
- "32838"
|
||||
environment:
|
||||
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
NBXPLORER_BIND: 0.0.0.0:32838
|
||||
volumes:
|
||||
- "nbxplorer_datadir:/datadir"
|
||||
|
||||
postgres:
|
||||
restart: unless-stopped
|
||||
image: postgres:9.6.5
|
||||
volumes:
|
||||
- "postgres_datadir:/var/lib/postgresql/data"
|
||||
|
||||
volumes:
|
||||
postgres_datadir:
|
||||
btcpay_datadir:
|
||||
nbxplorer_datadir:
|
||||
btcpay_datadir:
|
||||
@@ -4,7 +4,7 @@ services:
|
||||
feathercoind:
|
||||
restart: unless-stopped
|
||||
container_name: btcpayserver_feathercoind
|
||||
image: chekaz/docker-feathercoin:0.16.0
|
||||
image: chekaz/docker-feathercoin:0.16.3
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
rpcport=43782
|
||||
|
||||
@@ -2,7 +2,8 @@ version: "3"
|
||||
|
||||
services:
|
||||
clightning_litecoin:
|
||||
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
|
||||
image: nicolasdorier/clightning:v0.6.2-3
|
||||
stop_signal: SIGKILL
|
||||
container_name: btcpayserver_clightning_litecoin
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
|
||||
@@ -2,7 +2,7 @@ version: "3"
|
||||
|
||||
services:
|
||||
lnd_litecoin:
|
||||
image: btcpayserver/lnd:0.4.2.0.1
|
||||
image: btcpayserver/lnd:0.5-beta-2
|
||||
container_name: btcpayserver_lnd_litecoin
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
@@ -13,10 +13,12 @@ services:
|
||||
restlisten=0.0.0.0:8080
|
||||
litecoin.node=litecoind
|
||||
litecoind.rpchost=litecoind:43782
|
||||
litecoind.zmqpath=tcp://litecoind:28332
|
||||
litecoind.zmqpubrawblock=tcp://litecoind:28332
|
||||
litecoind.zmqpubrawtx=tcp://litecoind:28333
|
||||
externalip=${BTCPAY_HOST}:9736
|
||||
alias=${LIGHTNING_ALIAS}
|
||||
noencryptwallet=1
|
||||
adminmacaroonpath=/data/admin.macaroon
|
||||
noseedbackup=1
|
||||
notls=1
|
||||
ports:
|
||||
- "9736:9735"
|
||||
@@ -42,10 +44,11 @@ services:
|
||||
litecoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
zmqpubrawtx=tcp://0.0.0.0:28332
|
||||
zmqpubrawblock=tcp://0.0.0.0:28332
|
||||
zmqpubrawtx=tcp://0.0.0.0:28333
|
||||
expose:
|
||||
- "28332"
|
||||
- "28333"
|
||||
|
||||
volumes:
|
||||
lnd_litecoin_datadir:
|
||||
17
docker-compose-generator/docker-fragments/nbxplorer.yml
Normal file
17
docker-compose-generator/docker-fragments/nbxplorer.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
|
||||
nbxplorer:
|
||||
restart: unless-stopped
|
||||
image: nicolasdorier/nbxplorer:1.1.0.12
|
||||
expose:
|
||||
- "32838"
|
||||
environment:
|
||||
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
|
||||
NBXPLORER_BIND: 0.0.0.0:32838
|
||||
volumes:
|
||||
- "nbxplorer_datadir:/datadir"
|
||||
|
||||
volumes:
|
||||
nbxplorer_datadir:
|
||||
@@ -7,3 +7,15 @@ services:
|
||||
autopilot.active=1
|
||||
autopilot.maxchannels=5
|
||||
autopilot.allocation=0.6
|
||||
lnd_litecoin:
|
||||
environment:
|
||||
LND_EXTRA_ARGS: |
|
||||
autopilot.active=1
|
||||
autopilot.maxchannels=5
|
||||
autopilot.allocation=0.6
|
||||
lnd_bitcoingold:
|
||||
environment:
|
||||
LND_EXTRA_ARGS: |
|
||||
autopilot.active=1
|
||||
autopilot.maxchannels=5
|
||||
autopilot.allocation=0.6
|
||||
|
||||
@@ -1,8 +1,23 @@
|
||||
version: "3"
|
||||
# If you don't use Lightning Network, use opt-save-store-xxs instead
|
||||
# This save about 6 months of block, your lightning node won't be able to see channel created 6 months since the time you start it.
|
||||
|
||||
services:
|
||||
bitcoind:
|
||||
environment:
|
||||
# If you don't use Lightning Network, use opt-save-store-xxs instead
|
||||
# This save about 6 months of block, your lightning node won't be able to see channel created 6 months since the time you start it.
|
||||
BITCOIN_EXTRA_ARGS: prune=50000
|
||||
bgoldd:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=50000
|
||||
feathercoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=50000
|
||||
groestlcoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=50000
|
||||
litecoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=50000
|
||||
viacoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=50000
|
||||
@@ -1,8 +1,23 @@
|
||||
version: "3"
|
||||
# If you don't use Lightning Network, use opt-save-store-xxs instead
|
||||
# This save about 3 months of block, your lightning node won't be able to see channel created 3 months since the time you start it.
|
||||
|
||||
services:
|
||||
bitcoind:
|
||||
environment:
|
||||
# If you don't use Lightning Network, use opt-save-store-xxs instead
|
||||
# This save about 3 months of block, your lightning node won't be able to see channel created 3 months since the time you start it.
|
||||
BITCOIN_EXTRA_ARGS: prune=25000
|
||||
bgoldd:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=25000
|
||||
feathercoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=25000
|
||||
groestlcoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=25000
|
||||
litecoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=25000
|
||||
viacoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=25000
|
||||
@@ -1,8 +1,23 @@
|
||||
version: "3"
|
||||
# If you don't use Lightning Network, you want this
|
||||
# This save about 2 weeks worth of block
|
||||
|
||||
services:
|
||||
bitcoind:
|
||||
environment:
|
||||
# If you don't use Lightning Network, you want this
|
||||
# This save about 2 weeks worth of block
|
||||
BITCOIN_EXTRA_ARGS: prune=5000
|
||||
bgoldd:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=5000
|
||||
feathercoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=5000
|
||||
groestlcoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=5000
|
||||
litecoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=5000
|
||||
viacoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=5000
|
||||
@@ -1,8 +1,23 @@
|
||||
version: "3"
|
||||
# If you don't use Lightning Network, use opt-save-store-xxs instead
|
||||
# This save about 1 years of block, your lightning node won't be able to see channel created 1 year since the time you start it.
|
||||
|
||||
services:
|
||||
bitcoind:
|
||||
environment:
|
||||
# If you don't use Lightning Network, use opt-save-store-xxs instead
|
||||
# This save about 1 years of block, your lightning node won't be able to see channel created 1 year since the time you start it.
|
||||
BITCOIN_EXTRA_ARGS: prune=100000
|
||||
bgoldd:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=100000
|
||||
feathercoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=100000
|
||||
groestlcoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=100000
|
||||
litecoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=100000
|
||||
viacoind:
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: prune=100000
|
||||
11
docker-compose-generator/docker-fragments/postgres.yml
Normal file
11
docker-compose-generator/docker-fragments/postgres.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
postgres:
|
||||
restart: unless-stopped
|
||||
image: postgres:9.6.5
|
||||
volumes:
|
||||
- "postgres_datadir:/var/lib/postgresql/data"
|
||||
|
||||
volumes:
|
||||
postgres_datadir:
|
||||
12
docker-compose-generator/docker-fragments/traefik-labels.yml
Normal file
12
docker-compose-generator/docker-fragments/traefik-labels.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
btcpayserver:
|
||||
labels:
|
||||
- "traefik.backend=btcpayserver"
|
||||
- "traefik.backend.loadbalancer.sticky=true"
|
||||
- "traefik.enable=true"
|
||||
- "traefik.frontend.rule=Host:${BTCPAY_HOST}"
|
||||
- "traefik.port.rule=49392"
|
||||
- "traefik.acme.domains=${BTCPAY_HOST},www.${BTCPAY_HOST}"
|
||||
- "traefik.acme.email=${LETSENCRYPT_EMAIL}"
|
||||
22
docker-compose-generator/docker-fragments/traefik.yml
Normal file
22
docker-compose-generator/docker-fragments/traefik.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
traefik:
|
||||
restart: unless-stopped
|
||||
image: traefik
|
||||
container_name: traefik
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||
- "./traefik.toml:/traefik.toml"
|
||||
- "./acme.json:/acme.json:ro"
|
||||
- "./servers.toml:/servers.toml"
|
||||
- "./traefik_logs:/traefik_logs"
|
||||
|
||||
links:
|
||||
- btcpayserver
|
||||
|
||||
volumes:
|
||||
traefik_logs:
|
||||
@@ -4,7 +4,7 @@ services:
|
||||
viacoind:
|
||||
restart: unless-stopped
|
||||
container_name: btcpayserver_viacoind
|
||||
image: romanornr/docker-viacoin:0.15.1
|
||||
image: romanornr/docker-viacoin:0.15.2
|
||||
environment:
|
||||
BITCOIN_EXTRA_ARGS: |
|
||||
rpcport=43782
|
||||
|
||||
@@ -8,146 +8,160 @@ using System.IO;
|
||||
|
||||
namespace DockerGenerator
|
||||
{
|
||||
public class DockerComposeDefinition
|
||||
{
|
||||
public List<string> Fragments
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
private string _Name;
|
||||
public class DockerComposeDefinition
|
||||
{
|
||||
public List<string> Fragments
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
private string _Name;
|
||||
|
||||
public DockerComposeDefinition(string name, List<string> fragments)
|
||||
{
|
||||
Fragments = fragments;
|
||||
_Name = name;
|
||||
}
|
||||
public DockerComposeDefinition(string name, List<string> fragments)
|
||||
{
|
||||
Fragments = fragments;
|
||||
_Name = name;
|
||||
}
|
||||
|
||||
public string FragmentLocation
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public string BuildOutputDirectory
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public string FragmentLocation
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public string BuildOutputDirectory
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string GetFilePath()
|
||||
{
|
||||
return Path.Combine(BuildOutputDirectory, $"docker-compose.{_Name}.yml");
|
||||
}
|
||||
public void Build()
|
||||
{
|
||||
Console.WriteLine($"Generating {GetFilePath()}");
|
||||
var deserializer = new DeserializerBuilder().Build();
|
||||
var serializer = new SerializerBuilder().Build();
|
||||
public string GetFilePath()
|
||||
{
|
||||
return Path.Combine(BuildOutputDirectory, $"docker-compose.{_Name}.yml");
|
||||
}
|
||||
public void Build()
|
||||
{
|
||||
Console.WriteLine($"Generating {GetFilePath()}");
|
||||
var deserializer = new DeserializerBuilder().Build();
|
||||
var serializer = new SerializerBuilder().Build();
|
||||
|
||||
Console.WriteLine($"With fragments:");
|
||||
foreach(var fragment in Fragments)
|
||||
{
|
||||
Console.WriteLine($"\t{fragment}");
|
||||
}
|
||||
var services = new List<KeyValuePair<YamlNode, YamlNode>>();
|
||||
var volumes = new List<KeyValuePair<YamlNode, YamlNode>>();
|
||||
Console.WriteLine($"With fragments:");
|
||||
foreach (var fragment in Fragments.ToList())
|
||||
{
|
||||
var fragmentPath = GetFragmentLocation(fragment);
|
||||
if (!File.Exists(fragmentPath))
|
||||
{
|
||||
Console.WriteLine($"\t{fragment} not found in {fragmentPath}, ignoring...");
|
||||
Fragments.Remove(fragment);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"\t{fragment}");
|
||||
}
|
||||
}
|
||||
var services = new List<KeyValuePair<YamlNode, YamlNode>>();
|
||||
var volumes = new List<KeyValuePair<YamlNode, YamlNode>>();
|
||||
|
||||
foreach(var doc in Fragments.Select(f => ParseDocument(f)))
|
||||
{
|
||||
if(doc.Children.ContainsKey("services") && doc.Children["services"] is YamlMappingNode fragmentServicesRoot)
|
||||
{
|
||||
services.AddRange(fragmentServicesRoot.Children);
|
||||
}
|
||||
foreach (var doc in Fragments.Select(f => ParseDocument(f)))
|
||||
{
|
||||
if (doc.Children.ContainsKey("services") && doc.Children["services"] is YamlMappingNode fragmentServicesRoot)
|
||||
{
|
||||
services.AddRange(fragmentServicesRoot.Children);
|
||||
}
|
||||
|
||||
if(doc.Children.ContainsKey("volumes") && doc.Children["volumes"] is YamlMappingNode fragmentVolumesRoot)
|
||||
{
|
||||
volumes.AddRange(fragmentVolumesRoot.Children);
|
||||
}
|
||||
}
|
||||
if (doc.Children.ContainsKey("volumes") && doc.Children["volumes"] is YamlMappingNode fragmentVolumesRoot)
|
||||
{
|
||||
volumes.AddRange(fragmentVolumesRoot.Children);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
YamlMappingNode output = new YamlMappingNode();
|
||||
output.Add("version", new YamlScalarNode("3") { Style = YamlDotNet.Core.ScalarStyle.DoubleQuoted });
|
||||
output.Add("services", new YamlMappingNode(Merge(services)));
|
||||
output.Add("volumes", new YamlMappingNode(volumes));
|
||||
var result = serializer.Serialize(output);
|
||||
var outputFile = GetFilePath();
|
||||
File.WriteAllText(outputFile, result.Replace("''", ""));
|
||||
Console.WriteLine($"Generated {outputFile}");
|
||||
Console.WriteLine();
|
||||
}
|
||||
YamlMappingNode output = new YamlMappingNode();
|
||||
output.Add("version", new YamlScalarNode("3") { Style = YamlDotNet.Core.ScalarStyle.DoubleQuoted });
|
||||
output.Add("services", new YamlMappingNode(Merge(services)));
|
||||
output.Add("volumes", new YamlMappingNode(volumes));
|
||||
var result = serializer.Serialize(output);
|
||||
var outputFile = GetFilePath();
|
||||
File.WriteAllText(outputFile, result.Replace("''", ""));
|
||||
Console.WriteLine($"Generated {outputFile}");
|
||||
Console.WriteLine();
|
||||
}
|
||||
|
||||
private KeyValuePair<YamlNode, YamlNode>[] Merge(List<KeyValuePair<YamlNode, YamlNode>> services)
|
||||
{
|
||||
return services
|
||||
.GroupBy(s => s.Key.ToString(), s => s.Value)
|
||||
.Select(group =>
|
||||
(GroupName: group.Key,
|
||||
MainNode: group.OfType<YamlMappingNode>().SingleOrDefault(n => n.Children.ContainsKey("image")),
|
||||
MergedNodes: group.OfType<YamlMappingNode>().Where(n => !n.Children.ContainsKey("image"))))
|
||||
.Where(_ => _.MainNode != null)
|
||||
.Select(_ =>
|
||||
{
|
||||
foreach(var node in _.MergedNodes)
|
||||
{
|
||||
foreach(var child in node)
|
||||
{
|
||||
var childValue = child.Value;
|
||||
if(!_.MainNode.Children.TryGetValue(child.Key, out var mainChildValue))
|
||||
{
|
||||
mainChildValue = child.Value;
|
||||
_.MainNode.Add(child.Key, child.Value);
|
||||
}
|
||||
else if(childValue is YamlMappingNode childMapping && mainChildValue is YamlMappingNode mainChildMapping)
|
||||
{
|
||||
foreach(var leaf in childMapping)
|
||||
{
|
||||
if(mainChildMapping.Children.TryGetValue(leaf.Key, out var mainLeaf))
|
||||
{
|
||||
if(leaf.Value is YamlScalarNode leafScalar && mainLeaf is YamlScalarNode leafMainScalar)
|
||||
{
|
||||
var eof = EOF(leafMainScalar.Value) ?? EOF(leaf.Value.ToString());
|
||||
if(eof != null)
|
||||
{
|
||||
leafMainScalar.Value = leafMainScalar.Value + eof + leaf.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
leafMainScalar.Value = leafMainScalar.Value + "," + leaf.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mainChildMapping.Add(leaf.Key, leaf.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(childValue is YamlSequenceNode childSequence && mainChildValue is YamlSequenceNode mainSequence)
|
||||
{
|
||||
foreach(var c in childSequence.Children)
|
||||
{
|
||||
mainSequence.Add(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return new KeyValuePair<YamlNode, YamlNode>(_.GroupName, _.MainNode);
|
||||
}).ToArray();
|
||||
}
|
||||
private KeyValuePair<YamlNode, YamlNode>[] Merge(List<KeyValuePair<YamlNode, YamlNode>> services)
|
||||
{
|
||||
return services
|
||||
.GroupBy(s => s.Key.ToString(), s => s.Value)
|
||||
.Select(group =>
|
||||
(GroupName: group.Key,
|
||||
MainNode: group.OfType<YamlMappingNode>().SingleOrDefault(n => n.Children.ContainsKey("image")),
|
||||
MergedNodes: group.OfType<YamlMappingNode>().Where(n => !n.Children.ContainsKey("image"))))
|
||||
.Where(_ => _.MainNode != null)
|
||||
.Select(_ =>
|
||||
{
|
||||
foreach (var node in _.MergedNodes)
|
||||
{
|
||||
foreach (var child in node)
|
||||
{
|
||||
var childValue = child.Value;
|
||||
if (!_.MainNode.Children.TryGetValue(child.Key, out var mainChildValue))
|
||||
{
|
||||
mainChildValue = child.Value;
|
||||
_.MainNode.Add(child.Key, child.Value);
|
||||
}
|
||||
else if (childValue is YamlMappingNode childMapping && mainChildValue is YamlMappingNode mainChildMapping)
|
||||
{
|
||||
foreach (var leaf in childMapping)
|
||||
{
|
||||
if (mainChildMapping.Children.TryGetValue(leaf.Key, out var mainLeaf))
|
||||
{
|
||||
if (leaf.Value is YamlScalarNode leafScalar && mainLeaf is YamlScalarNode leafMainScalar)
|
||||
{
|
||||
var eof = EOF(leafMainScalar.Value) ?? EOF(leaf.Value.ToString());
|
||||
if (eof != null)
|
||||
{
|
||||
leafMainScalar.Value = leafMainScalar.Value + eof + leaf.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
leafMainScalar.Value = leafMainScalar.Value + "," + leaf.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mainChildMapping.Add(leaf.Key, leaf.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (childValue is YamlSequenceNode childSequence && mainChildValue is YamlSequenceNode mainSequence)
|
||||
{
|
||||
foreach (var c in childSequence.Children)
|
||||
{
|
||||
mainSequence.Add(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return new KeyValuePair<YamlNode, YamlNode>(_.GroupName, _.MainNode);
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
private string EOF(string value)
|
||||
{
|
||||
if(value.Contains("\r\n", StringComparison.OrdinalIgnoreCase))
|
||||
return "\r\n";
|
||||
if(value.Contains("\n", StringComparison.OrdinalIgnoreCase))
|
||||
return "\n";
|
||||
return null;
|
||||
}
|
||||
private string EOF(string value)
|
||||
{
|
||||
if (value.Contains("\r\n", StringComparison.OrdinalIgnoreCase))
|
||||
return "\r\n";
|
||||
if (value.Contains("\n", StringComparison.OrdinalIgnoreCase))
|
||||
return "\n";
|
||||
return null;
|
||||
}
|
||||
|
||||
private YamlMappingNode ParseDocument(string fragment)
|
||||
{
|
||||
var input = new StringReader(File.ReadAllText(Path.Combine(FragmentLocation, $"{fragment}.yml")));
|
||||
YamlStream stream = new YamlStream();
|
||||
stream.Load(input);
|
||||
return (YamlMappingNode)stream.Documents[0].RootNode;
|
||||
}
|
||||
}
|
||||
private YamlMappingNode ParseDocument(string fragment)
|
||||
{
|
||||
var input = new StringReader(File.ReadAllText(GetFragmentLocation(fragment)));
|
||||
YamlStream stream = new YamlStream();
|
||||
stream.Load(input);
|
||||
return (YamlMappingNode)stream.Documents[0].RootNode;
|
||||
}
|
||||
|
||||
private string GetFragmentLocation(string fragment)
|
||||
{
|
||||
return Path.Combine(FragmentLocation, $"{fragment}.yml");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,50 +14,15 @@ namespace DockerGenerator
|
||||
var root = Environment.GetEnvironmentVariable("INSIDE_CONTAINER") == "1" ? FindRoot("app")
|
||||
: Path.GetFullPath(Path.Combine(FindRoot("docker-compose-generator"), ".."));
|
||||
|
||||
if(args.Any(a => a == "pregen"))
|
||||
{
|
||||
var productionLocation = Path.GetFullPath(Path.Combine(root, "Production"));
|
||||
var testLocation = Path.GetFullPath(Path.Combine(root, "Production-NoReverseProxy"));
|
||||
var composition = DockerComposition.FromEnvironmentVariables();
|
||||
Console.WriteLine("Crypto: " + string.Join(", ", composition.SelectedCryptos.ToArray()));
|
||||
Console.WriteLine("Lightning: " + composition.SelectedLN);
|
||||
Console.WriteLine("ReverseProxy: " + composition.SelectedProxy);
|
||||
var generatedLocation = Path.GetFullPath(Path.Combine(root, "Generated"));
|
||||
|
||||
foreach(var proxy in new[] { "nginx", "no-reverseproxy" })
|
||||
{
|
||||
foreach(var lightning in new[] { "clightning", "" })
|
||||
{
|
||||
foreach(var btc in new[] { "btc", "" })
|
||||
{
|
||||
foreach(var ltc in new[] { "ltc", "" })
|
||||
{
|
||||
if(btc == "" && ltc == "")
|
||||
continue;
|
||||
string name = $"{btc}-{ltc}-{lightning}".Replace("--", "-");
|
||||
if(name.EndsWith("-"))
|
||||
name = name.Substring(0, name.Length - 1);
|
||||
if(name.StartsWith("-"))
|
||||
name = name.Substring(1, name.Length - 1);
|
||||
var composition = new DockerComposition();
|
||||
composition.SelectedCryptos = new HashSet<string>();
|
||||
composition.SelectedCryptos.Add(btc);
|
||||
composition.SelectedCryptos.Add(ltc);
|
||||
composition.SelectedLN = lightning;
|
||||
composition.SelectedProxy = proxy;
|
||||
new Program().Run(composition, name, proxy == "nginx" ? productionLocation : testLocation);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var composition = DockerComposition.FromEnvironmentVariables();
|
||||
Console.WriteLine("Crypto: " + string.Join(", ", composition.SelectedCryptos.ToArray()));
|
||||
Console.WriteLine("Lightning: " + composition.SelectedLN);
|
||||
Console.WriteLine("ReverseProxy: " + composition.SelectedProxy);
|
||||
var generatedLocation = Path.GetFullPath(Path.Combine(root, "Generated"));
|
||||
|
||||
var name = Environment.GetEnvironmentVariable("BTCPAYGEN_SUBNAME");
|
||||
name = string.IsNullOrEmpty(name) ? "generated" : name;
|
||||
new Program().Run(composition, name, generatedLocation);
|
||||
}
|
||||
var name = Environment.GetEnvironmentVariable("BTCPAYGEN_SUBNAME");
|
||||
name = string.IsNullOrEmpty(name) ? "generated" : name;
|
||||
new Program().Run(composition, name, generatedLocation);
|
||||
}
|
||||
|
||||
private void Run(DockerComposition composition, string name, string output)
|
||||
@@ -67,35 +32,44 @@ namespace DockerGenerator
|
||||
fragmentLocation = Path.GetFullPath(Path.Combine(fragmentLocation, "docker-fragments"));
|
||||
|
||||
var fragments = new List<string>();
|
||||
if(composition.SelectedProxy == "nginx")
|
||||
switch (composition.SelectedProxy)
|
||||
{
|
||||
fragments.Add("nginx");
|
||||
}
|
||||
else
|
||||
{
|
||||
fragments.Add("btcpayserver-noreverseproxy");
|
||||
case "nginx":
|
||||
|
||||
fragments.Add("nginx");
|
||||
fragments.Add("btcpayserver-nginx");
|
||||
break;
|
||||
case "traefik":
|
||||
fragments.Add("traefik");
|
||||
fragments.Add("traefik-labels");
|
||||
break;
|
||||
case "no-reverseproxy":
|
||||
fragments.Add("btcpayserver-noreverseproxy");
|
||||
break;
|
||||
}
|
||||
fragments.Add("btcpayserver");
|
||||
foreach(var crypto in CryptoDefinition.GetDefinitions())
|
||||
fragments.Add("nbxplorer");
|
||||
fragments.Add("postgres");
|
||||
foreach (var crypto in CryptoDefinition.GetDefinitions())
|
||||
{
|
||||
if(!composition.SelectedCryptos.Contains(crypto.Crypto))
|
||||
if (!composition.SelectedCryptos.Contains(crypto.Crypto))
|
||||
continue;
|
||||
|
||||
fragments.Add(crypto.CryptoFragment);
|
||||
if(composition.SelectedLN == "clightning" && crypto.CLightningFragment != null)
|
||||
if (composition.SelectedLN == "clightning" && crypto.CLightningFragment != null)
|
||||
{
|
||||
fragments.Add(crypto.CLightningFragment);
|
||||
}
|
||||
if(composition.SelectedLN == "lnd" && crypto.LNDFragment != null)
|
||||
{
|
||||
fragments.Add(crypto.LNDFragment);
|
||||
}
|
||||
}
|
||||
if (composition.SelectedLN == "lnd" && crypto.LNDFragment != null)
|
||||
{
|
||||
fragments.Add(crypto.LNDFragment);
|
||||
}
|
||||
}
|
||||
|
||||
foreach(var fragment in composition.AdditionalFragments)
|
||||
{
|
||||
fragments.Add(fragment.Trim());
|
||||
}
|
||||
foreach (var fragment in composition.AdditionalFragments)
|
||||
{
|
||||
fragments.Add(fragment.Trim());
|
||||
}
|
||||
|
||||
var def = new DockerComposeDefinition(name, fragments);
|
||||
def.FragmentLocation = fragmentLocation;
|
||||
@@ -107,11 +81,11 @@ namespace DockerGenerator
|
||||
{
|
||||
string directory = Directory.GetCurrentDirectory();
|
||||
int i = 0;
|
||||
while(true)
|
||||
while (true)
|
||||
{
|
||||
if(i > 10)
|
||||
if (i > 10)
|
||||
throw new DirectoryNotFoundException(rootDirectory);
|
||||
if(directory.EndsWith(rootDirectory))
|
||||
if (directory.EndsWith(rootDirectory))
|
||||
return directory;
|
||||
directory = Path.GetFullPath(Path.Combine(directory, ".."));
|
||||
i++;
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="YamlDotNet" Version="4.3.1" />
|
||||
<PackageReference Include="YamlDotNet" Version="5.2.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1 +1 @@
|
||||
docker exec -ti btcpayserver_lnd_litecoin lncli $args
|
||||
docker exec -ti btcpayserver_lnd_litecoin lncli --macaroonpath /root/.lnd/admin.macaroon $args
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker exec -ti btcpayserver_lnd_litecoin lncli "$@"
|
||||
docker exec -ti btcpayserver_lnd_litecoin lncli --macaroonpath /root/.lnd/admin.macaroon "$@"
|
||||
|
||||
Reference in New Issue
Block a user