diff --git a/.gitattributes b/.gitattributes index 48e8fa1..3f0c902 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11,6 +11,7 @@ # Declare files that will always have CRLF line endings on checkout. *.sh text eol=lf +*.yml text eof=lf # Denote all files that are truly binary and should not be modified. *.png binary diff --git a/Production-NoReverseProxy/docker-compose.btc-clightning.yml b/Production-NoReverseProxy/docker-compose.btc-clightning.yml index 428ae48..06dc2c3 100644 --- a/Production-NoReverseProxy/docker-compose.btc-clightning.yml +++ b/Production-NoReverseProxy/docker-compose.btc-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.6 + image: nicolasdorier/btcpayserver:1.0.2.18 expose: - "49392" environment: @@ -32,7 +32,7 @@ services: - "80:49392" nbxplorer: restart: always - image: nicolasdorier/nbxplorer:1.0.2.3 + image: nicolasdorier/nbxplorer:1.0.2.7 expose: - "32838" environment: @@ -67,14 +67,15 @@ services: volumes: - "bitcoin_datadir:/data" clightning_bitcoin: - image: nicolasdorier/clightning:0.0.0.12 + image: nicolasdorier/clightning:0.0.0.14 container_name: btcpayserver_clightning_bitcoin restart: always environment: LIGHTNINGD_OPT: | bitcoin-datadir=/etc/bitcoin bitcoin-rpcconnect=bitcoind - ipaddr=${BTCPAY_HOST} + announce-addr=${BTCPAY_HOST}:9735 + bind-addr=0.0.0.0:9735 network=${NBITCOIN_NETWORK:-regtest} alias=${LIGHTNING_ALIAS} chain=btc diff --git a/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml b/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml index bc0fa18..aa1b753 100644 --- a/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml +++ b/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.6 + image: nicolasdorier/btcpayserver:1.0.2.18 expose: - "49392" environment: @@ -36,7 +36,7 @@ services: - "80:49392" nbxplorer: restart: always - image: nicolasdorier/nbxplorer:1.0.2.3 + image: nicolasdorier/nbxplorer:1.0.2.7 expose: - "32838" environment: @@ -75,15 +75,15 @@ services: volumes: - "litecoin_datadir:/data" clightning_litecoin: - image: nicolasdorier/clightning:0.0.0.12 + image: nicolasdorier/clightning:0.0.0.14 container_name: btcpayserver_clightning_litecoin restart: always environment: LIGHTNINGD_OPT: | bitcoin-datadir=/etc/litecoin bitcoin-rpcconnect=litecoind - port=9736 - ipaddr=${BTCPAY_HOST}:9736 + bind-addr=0.0.0.0:9735 + announce-addr=${BTCPAY_HOST}:9736 network=${NBITCOIN_NETWORK:-regtest} alias=${LIGHTNING_ALIAS} chain=ltc @@ -91,7 +91,7 @@ services: - "clightning_litecoin_datadir:/root/.lightning" - "litecoin_datadir:/etc/litecoin" ports: - - "9736:9736" + - "9736:9735" links: - litecoind bitcoind: @@ -110,14 +110,15 @@ services: volumes: - "bitcoin_datadir:/data" clightning_bitcoin: - image: nicolasdorier/clightning:0.0.0.12 + image: nicolasdorier/clightning:0.0.0.14 container_name: btcpayserver_clightning_bitcoin restart: always environment: LIGHTNINGD_OPT: | bitcoin-datadir=/etc/bitcoin bitcoin-rpcconnect=bitcoind - ipaddr=${BTCPAY_HOST} + announce-addr=${BTCPAY_HOST}:9735 + bind-addr=0.0.0.0:9735 network=${NBITCOIN_NETWORK:-regtest} alias=${LIGHTNING_ALIAS} chain=btc diff --git a/Production-NoReverseProxy/docker-compose.btc-ltc.yml b/Production-NoReverseProxy/docker-compose.btc-ltc.yml index 651e853..cf841b8 100644 --- a/Production-NoReverseProxy/docker-compose.btc-ltc.yml +++ b/Production-NoReverseProxy/docker-compose.btc-ltc.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.6 + image: nicolasdorier/btcpayserver:1.0.2.18 expose: - "49392" environment: @@ -30,7 +30,7 @@ services: - "80:49392" nbxplorer: restart: always - image: nicolasdorier/nbxplorer:1.0.2.3 + image: nicolasdorier/nbxplorer:1.0.2.7 expose: - "32838" environment: diff --git a/Production-NoReverseProxy/docker-compose.btc.yml b/Production-NoReverseProxy/docker-compose.btc.yml index fea0e1b..80419bb 100644 --- a/Production-NoReverseProxy/docker-compose.btc.yml +++ b/Production-NoReverseProxy/docker-compose.btc.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.6 + image: nicolasdorier/btcpayserver:1.0.2.18 expose: - "49392" environment: @@ -29,7 +29,7 @@ services: - "80:49392" nbxplorer: restart: always - image: nicolasdorier/nbxplorer:1.0.2.3 + image: nicolasdorier/nbxplorer:1.0.2.7 expose: - "32838" environment: diff --git a/Production-NoReverseProxy/docker-compose.ltc-clightning.yml b/Production-NoReverseProxy/docker-compose.ltc-clightning.yml index 069a466..cac6396 100644 --- a/Production-NoReverseProxy/docker-compose.ltc-clightning.yml +++ b/Production-NoReverseProxy/docker-compose.ltc-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.6 + image: nicolasdorier/btcpayserver:1.0.2.18 expose: - "49392" environment: @@ -32,7 +32,7 @@ services: - "80:49392" nbxplorer: restart: always - image: nicolasdorier/nbxplorer:1.0.2.3 + image: nicolasdorier/nbxplorer:1.0.2.7 expose: - "32838" environment: @@ -67,15 +67,15 @@ services: volumes: - "litecoin_datadir:/data" clightning_litecoin: - image: nicolasdorier/clightning:0.0.0.12 + image: nicolasdorier/clightning:0.0.0.14 container_name: btcpayserver_clightning_litecoin restart: always environment: LIGHTNINGD_OPT: | bitcoin-datadir=/etc/litecoin bitcoin-rpcconnect=litecoind - port=9736 - ipaddr=${BTCPAY_HOST}:9736 + bind-addr=0.0.0.0:9735 + announce-addr=${BTCPAY_HOST}:9736 network=${NBITCOIN_NETWORK:-regtest} alias=${LIGHTNING_ALIAS} chain=ltc @@ -83,7 +83,7 @@ services: - "clightning_litecoin_datadir:/root/.lightning" - "litecoin_datadir:/etc/litecoin" ports: - - "9736:9736" + - "9736:9735" links: - litecoind volumes: diff --git a/Production-NoReverseProxy/docker-compose.ltc.yml b/Production-NoReverseProxy/docker-compose.ltc.yml index dfb76e4..e9a6574 100644 --- a/Production-NoReverseProxy/docker-compose.ltc.yml +++ b/Production-NoReverseProxy/docker-compose.ltc.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.6 + image: nicolasdorier/btcpayserver:1.0.2.18 expose: - "49392" environment: @@ -29,7 +29,7 @@ services: - "80:49392" nbxplorer: restart: always - image: nicolasdorier/nbxplorer:1.0.2.3 + image: nicolasdorier/nbxplorer:1.0.2.7 expose: - "32838" environment: diff --git a/Production/docker-compose.btc-clightning.yml b/Production/docker-compose.btc-clightning.yml index 42b0f45..9777eed 100644 --- a/Production/docker-compose.btc-clightning.yml +++ b/Production/docker-compose.btc-clightning.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.6 + image: nicolasdorier/btcpayserver:1.0.2.18 expose: - "49392" environment: @@ -74,7 +74,7 @@ services: - "clightning_bitcoin_datadir:/etc/clightning_bitcoin" nbxplorer: restart: always - image: nicolasdorier/nbxplorer:1.0.2.3 + image: nicolasdorier/nbxplorer:1.0.2.7 expose: - "32838" environment: @@ -109,14 +109,15 @@ services: volumes: - "bitcoin_datadir:/data" clightning_bitcoin: - image: nicolasdorier/clightning:0.0.0.12 + image: nicolasdorier/clightning:0.0.0.14 container_name: btcpayserver_clightning_bitcoin restart: always environment: LIGHTNINGD_OPT: | bitcoin-datadir=/etc/bitcoin bitcoin-rpcconnect=bitcoind - ipaddr=${BTCPAY_HOST} + announce-addr=${BTCPAY_HOST}:9735 + bind-addr=0.0.0.0:9735 network=${NBITCOIN_NETWORK:-regtest} alias=${LIGHTNING_ALIAS} chain=btc diff --git a/Production/docker-compose.btc-ltc-clightning.yml b/Production/docker-compose.btc-ltc-clightning.yml index a43cf2e..69689d9 100644 --- a/Production/docker-compose.btc-ltc-clightning.yml +++ b/Production/docker-compose.btc-ltc-clightning.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.6 + image: nicolasdorier/btcpayserver:1.0.2.18 expose: - "49392" environment: @@ -78,7 +78,7 @@ services: - "clightning_bitcoin_datadir:/etc/clightning_bitcoin" nbxplorer: restart: always - image: nicolasdorier/nbxplorer:1.0.2.3 + image: nicolasdorier/nbxplorer:1.0.2.7 expose: - "32838" environment: @@ -117,15 +117,15 @@ services: volumes: - "litecoin_datadir:/data" clightning_litecoin: - image: nicolasdorier/clightning:0.0.0.12 + image: nicolasdorier/clightning:0.0.0.14 container_name: btcpayserver_clightning_litecoin restart: always environment: LIGHTNINGD_OPT: | bitcoin-datadir=/etc/litecoin bitcoin-rpcconnect=litecoind - port=9736 - ipaddr=${BTCPAY_HOST}:9736 + bind-addr=0.0.0.0:9735 + announce-addr=${BTCPAY_HOST}:9736 network=${NBITCOIN_NETWORK:-regtest} alias=${LIGHTNING_ALIAS} chain=ltc @@ -133,7 +133,7 @@ services: - "clightning_litecoin_datadir:/root/.lightning" - "litecoin_datadir:/etc/litecoin" ports: - - "9736:9736" + - "9736:9735" links: - litecoind bitcoind: @@ -152,14 +152,15 @@ services: volumes: - "bitcoin_datadir:/data" clightning_bitcoin: - image: nicolasdorier/clightning:0.0.0.12 + image: nicolasdorier/clightning:0.0.0.14 container_name: btcpayserver_clightning_bitcoin restart: always environment: LIGHTNINGD_OPT: | bitcoin-datadir=/etc/bitcoin bitcoin-rpcconnect=bitcoind - ipaddr=${BTCPAY_HOST} + announce-addr=${BTCPAY_HOST}:9735 + bind-addr=0.0.0.0:9735 network=${NBITCOIN_NETWORK:-regtest} alias=${LIGHTNING_ALIAS} chain=btc diff --git a/Production/docker-compose.btc-ltc.yml b/Production/docker-compose.btc-ltc.yml index 29e6bd7..8f1efb8 100644 --- a/Production/docker-compose.btc-ltc.yml +++ b/Production/docker-compose.btc-ltc.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.6 + image: nicolasdorier/btcpayserver:1.0.2.18 expose: - "49392" environment: @@ -72,7 +72,7 @@ services: - "nbxplorer_datadir:/root/.nbxplorer" nbxplorer: restart: always - image: nicolasdorier/nbxplorer:1.0.2.3 + image: nicolasdorier/nbxplorer:1.0.2.7 expose: - "32838" environment: diff --git a/Production/docker-compose.btc.yml b/Production/docker-compose.btc.yml index 8352627..a73e1bf 100644 --- a/Production/docker-compose.btc.yml +++ b/Production/docker-compose.btc.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.6 + image: nicolasdorier/btcpayserver:1.0.2.18 expose: - "49392" environment: @@ -71,7 +71,7 @@ services: - "nbxplorer_datadir:/root/.nbxplorer" nbxplorer: restart: always - image: nicolasdorier/nbxplorer:1.0.2.3 + image: nicolasdorier/nbxplorer:1.0.2.7 expose: - "32838" environment: diff --git a/Production/docker-compose.ltc-clightning.yml b/Production/docker-compose.ltc-clightning.yml index 429c0a6..48ffbae 100644 --- a/Production/docker-compose.ltc-clightning.yml +++ b/Production/docker-compose.ltc-clightning.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.6 + image: nicolasdorier/btcpayserver:1.0.2.18 expose: - "49392" environment: @@ -74,7 +74,7 @@ services: - "clightning_litecoin_datadir:/etc/clightning_litecoin" nbxplorer: restart: always - image: nicolasdorier/nbxplorer:1.0.2.3 + image: nicolasdorier/nbxplorer:1.0.2.7 expose: - "32838" environment: @@ -109,15 +109,15 @@ services: volumes: - "litecoin_datadir:/data" clightning_litecoin: - image: nicolasdorier/clightning:0.0.0.12 + image: nicolasdorier/clightning:0.0.0.14 container_name: btcpayserver_clightning_litecoin restart: always environment: LIGHTNINGD_OPT: | bitcoin-datadir=/etc/litecoin bitcoin-rpcconnect=litecoind - port=9736 - ipaddr=${BTCPAY_HOST}:9736 + bind-addr=0.0.0.0:9735 + announce-addr=${BTCPAY_HOST}:9736 network=${NBITCOIN_NETWORK:-regtest} alias=${LIGHTNING_ALIAS} chain=ltc @@ -125,7 +125,7 @@ services: - "clightning_litecoin_datadir:/root/.lightning" - "litecoin_datadir:/etc/litecoin" ports: - - "9736:9736" + - "9736:9735" links: - litecoind volumes: diff --git a/Production/docker-compose.ltc.yml b/Production/docker-compose.ltc.yml index 85c7e54..5c5fc68 100644 --- a/Production/docker-compose.ltc.yml +++ b/Production/docker-compose.ltc.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.6 + image: nicolasdorier/btcpayserver:1.0.2.18 expose: - "49392" environment: @@ -71,7 +71,7 @@ services: - "nbxplorer_datadir:/root/.nbxplorer" nbxplorer: restart: always - image: nicolasdorier/nbxplorer:1.0.2.3 + image: nicolasdorier/nbxplorer:1.0.2.7 expose: - "32838" environment: diff --git a/docker-compose-generator/.dockerignore b/docker-compose-generator/.dockerignore new file mode 100644 index 0000000..5a76cae --- /dev/null +++ b/docker-compose-generator/.dockerignore @@ -0,0 +1,124 @@ +# Build Folders (you can keep bin if you'd like, to store dlls and pdbs) +**/[Bb]in/ +**/[Oo]bj/ +node_modules/ +dist/ + +# mstest test results +TestResults + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results +[Dd]ebug/ +[Rr]elease/ +x64/ +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.log +*.vspscc +*.vssscc +.builds + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper* + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish + +# Publish Web Output +*.Publish.xml + +# NuGet Packages Directory +packages + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +[Bb]in +[Oo]bj +sql +TestResults +[Tt]est[Rr]esult* +*.Cache +ClientBin +[Ss]tyle[Cc]op.* +~$* +*.dbmdl +Generated_Code #added for RIA/Silverlight projects + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML + +src/Rapporteringsregisteret.Web/assets/less/*.css + +MetricResults/ +*.sln.ide/ + +_configs/ + +# vnext stuff +bower_components +output + +.vs +**/launchSettings.json diff --git a/docker-compose-generator/Dockerfile b/docker-compose-generator/Dockerfile new file mode 100644 index 0000000..ee3eefa --- /dev/null +++ b/docker-compose-generator/Dockerfile @@ -0,0 +1,19 @@ +FROM microsoft/aspnetcore-build:2.0.6-2.1.101-stretch AS builder +WORKDIR /source +COPY src/docker-compose-generator.csproj docker-compose-generator.csproj +# Cache some dependencies +RUN dotnet restore +COPY src/. . +RUN dotnet publish --output /app/ --configuration Release + +FROM microsoft/aspnetcore:2.0.6-stretch +WORKDIR /app + +RUN mkdir /datadir +ENV APP_DATADIR=/datadir +VOLUME /datadir + +COPY --from=builder "/app" . +COPY docker-fragments docker-fragments + +ENTRYPOINT ["dotnet", "docker-compose-generator.dll"] diff --git a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml index 894ac93..0496025 100644 --- a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml @@ -2,14 +2,15 @@ version: "3" services: clightning_bitcoin: - image: nicolasdorier/clightning:0.0.0.12 + image: nicolasdorier/clightning:0.0.0.14 container_name: btcpayserver_clightning_bitcoin restart: always environment: LIGHTNINGD_OPT: | bitcoin-datadir=/etc/bitcoin bitcoin-rpcconnect=bitcoind - ipaddr=${BTCPAY_HOST} + announce-addr=${BTCPAY_HOST}:9735 + bind-addr=0.0.0.0:9735 network=${NBITCOIN_NETWORK:-regtest} alias=${LIGHTNING_ALIAS} chain=btc diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index 4a0de9c..1e1b6f8 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.6 + image: nicolasdorier/btcpayserver:1.0.2.18 expose: - "49392" environment: @@ -34,7 +34,7 @@ services: nbxplorer: restart: always - image: nicolasdorier/nbxplorer:1.0.2.3 + image: nicolasdorier/nbxplorer:1.0.2.7 expose: - "32838" environment: diff --git a/docker-compose-generator/docker-fragments/litecoin-clightning.yml b/docker-compose-generator/docker-fragments/litecoin-clightning.yml index 8439e30..b39fd32 100644 --- a/docker-compose-generator/docker-fragments/litecoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/litecoin-clightning.yml @@ -2,15 +2,15 @@ version: "3" services: clightning_litecoin: - image: nicolasdorier/clightning:0.0.0.12 + image: nicolasdorier/clightning:0.0.0.14 container_name: btcpayserver_clightning_litecoin restart: always environment: LIGHTNINGD_OPT: | bitcoin-datadir=/etc/litecoin bitcoin-rpcconnect=litecoind - port=9736 - ipaddr=${BTCPAY_HOST}:9736 + bind-addr=0.0.0.0:9735 + announce-addr=${BTCPAY_HOST}:9736 network=${NBITCOIN_NETWORK:-regtest} alias=${LIGHTNING_ALIAS} chain=ltc @@ -18,7 +18,7 @@ services: - "clightning_litecoin_datadir:/root/.lightning" - "litecoin_datadir:/etc/litecoin" ports: - - "9736:9736" + - "9736:9735" links: - litecoind btcpayserver: diff --git a/docker-compose-generator/src/Program.cs b/docker-compose-generator/src/Program.cs index 1ce30cf..0e2e2fe 100644 --- a/docker-compose-generator/src/Program.cs +++ b/docker-compose-generator/src/Program.cs @@ -105,11 +105,16 @@ namespace DockerGenerator private string FindLocation(string path) { + string directory = path; + int i = 0; while(true) { + if(i > 10) + throw new DirectoryNotFoundException(directory); if(Directory.Exists(path)) return path; path = Path.Combine("..", path); + i++; } } } diff --git a/generate-docker-compose.ps1 b/generate-docker-compose.ps1 index d2d2e84..1b2422c 100644 --- a/generate-docker-compose.ps1 +++ b/generate-docker-compose.ps1 @@ -1 +1,4 @@ -cd .\docker-compose-generator; dotnet run -p .\src\docker-compose-generator.csproj; cd ..; \ No newline at end of file +# This script will run docker-compose-generator in a container to generate the yml files + +docker build -t btcpayserver/docker-compose-generator "$(Get-Location)\docker-compose-generator" +docker run -v "$(Get-Location)\Production:/app/Production" -v "$(Get-Location)\Production-NoReverseProxy:/app/Production-NoReverseProxy" --rm btcpayserver/docker-compose-generator \ No newline at end of file diff --git a/generate-docker-compose.sh b/generate-docker-compose.sh new file mode 100755 index 0000000..47afeb6 --- /dev/null +++ b/generate-docker-compose.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# This script will run docker-compose-generator in a container to generate the yml files +docker build -t btcpayserver/docker-compose-generator "$(pwd)/docker-compose-generator" +docker run -v "$(pwd)/Production:/app/Production" -v "$(pwd)/Production-NoReverseProxy:/app/Production-NoReverseProxy" --rm btcpayserver/docker-compose-generator \ No newline at end of file