From 575785abf1fdd1e2ced1195793f45aecce2c8e1d Mon Sep 17 00:00:00 2001 From: Nicolas Dorier Date: Mon, 4 Apr 2022 15:50:02 +0900 Subject: [PATCH] Migrate NBX to postgres (#622) * Migrate NBX to postgres * bump * bump * Add applicatoin name to connectoin string * Add link postgres * Change Max Pool Size * maxPool size --- README.md | 2 +- contrib/build-all-images.sh | 12 ++++++------ .../docker-fragments/btcpayserver.yml | 2 +- .../docker-fragments/nbxplorer.yml | 7 ++++++- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b9c9e0e..03b416c 100644 --- a/README.md +++ b/README.md @@ -344,7 +344,7 @@ We are trying to update our dependencies to run on `arm32v7` and `x64` boards. H | btcpayserver/lnd | v0.14.2-beta | [✔️](https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.14.2-beta/linuxamd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.14.2-beta/linuxarm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.14.2-beta/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/lnd) - [DockerHub](https://hub.docker.com/r/btcpayserver/lnd) | | btcpayserver/bitcoin | 22.0-1 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/22.0-1/Bitcoin/22.0/linuxamd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/22.0-1/Bitcoin/22.0/linuxarm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/22.0-1/Bitcoin/22.0/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/bitcoin) | | btcpayserver/btcpayserver | 1.4.9$? | [✔️](https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.4.9/amd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.4.9/arm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.4.9/arm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/btcpayserver) - [DockerHub](https://hub.docker.com/r/btcpayserver/btcpayserver) | -| nicolasdorier/nbxplorer | 2.2.20 | [✔️](https://raw.githubusercontent.com/dgarage/nbxplorer/v2.2.20/Dockerfile.linuxamd64) | [✔️](https://raw.githubusercontent.com/dgarage/nbxplorer/v2.2.20/Dockerfile.linuxarm32v7) | [✔️](https://raw.githubusercontent.com/dgarage/nbxplorer/v2.2.20/Dockerfile.linuxarm64v8) | [Github](https://github.com/dgarage/nbxplorer) - [DockerHub](https://hub.docker.com/r/nicolasdorier/nbxplorer) | +| nicolasdorier/nbxplorer | 2.3.4 | [✔️](https://raw.githubusercontent.com/dgarage/nbxplorer/v2.3.4/Dockerfile.linuxamd64) | [✔️](https://raw.githubusercontent.com/dgarage/nbxplorer/v2.3.4/Dockerfile.linuxarm32v7) | [✔️](https://raw.githubusercontent.com/dgarage/nbxplorer/v2.3.4/Dockerfile.linuxarm64v8) | [Github](https://github.com/dgarage/nbxplorer) - [DockerHub](https://hub.docker.com/r/nicolasdorier/nbxplorer) | | btcpayserver/letsencrypt-nginx-proxy-companion | 1.12.2 | [✔️](https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v1.12.2/linuxamd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v1.12.2/linuxarm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v1.12.2/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion) - [DockerHub](https://hub.docker.com/r/btcpayserver/letsencrypt-nginx-proxy-companion) | | nginx | 1.16.0 | [✔️](https://raw.githubusercontent.com/nginxinc/docker-nginx/1.16.0/stable/stretch/Dockerfile) | [✔️](https://raw.githubusercontent.com/nginxinc/docker-nginx/1.16.0/stable/stretch/Dockerfile) | [✔️](https://raw.githubusercontent.com/nginxinc/docker-nginx/1.16.0/stable/stretch/Dockerfile) | [Github](https://github.com/nginxinc/docker-nginx) - [DockerHub](https://hub.docker.com/_/nginx) | | btcpayserver/docker-gen | 0.7.8 | [✔️](https://raw.githubusercontent.com/btcpayserver/docker-gen/v0.7.8/linuxamd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/docker-gen/v0.7.8/linuxarm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/docker-gen/v0.7.8/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/docker-gen) - [DockerHub](https://hub.docker.com/r/btcpayserver/docker-gen) | diff --git a/contrib/build-all-images.sh b/contrib/build-all-images.sh index 9754d5d..0adc4b5 100644 --- a/contrib/build-all-images.sh +++ b/contrib/build-all-images.sh @@ -474,18 +474,18 @@ cd - && cd .. # Build nbxplorer -# https://raw.githubusercontent.com/dgarage/nbxplorer/v2.2.20/Dockerfile.linuxamd64 +# https://raw.githubusercontent.com/dgarage/nbxplorer/v2.3.4/Dockerfile.linuxamd64 DOCKERFILE="Dockerfile.linuxamd64" -# https://raw.githubusercontent.com/dgarage/nbxplorer/v2.2.20/Dockerfile.linuxarm32v7 +# https://raw.githubusercontent.com/dgarage/nbxplorer/v2.3.4/Dockerfile.linuxarm32v7 [[ "$(uname -m)" == "armv7l" ]] && DOCKERFILE="Dockerfile.linuxarm32v7" -# https://raw.githubusercontent.com/dgarage/nbxplorer/v2.2.20/Dockerfile.linuxarm64v8 +# https://raw.githubusercontent.com/dgarage/nbxplorer/v2.3.4/Dockerfile.linuxarm64v8 [[ "$(uname -m)" == "aarch64" ]] && DOCKERFILE="Dockerfile.linuxarm64v8" -echo "Building nicolasdorier/nbxplorer:2.2.20" +echo "Building nicolasdorier/nbxplorer:2.3.4" git clone https://github.com/dgarage/nbxplorer nbxplorer cd nbxplorer -git checkout v2.2.20 +git checkout v2.3.4 cd "$(dirname $DOCKERFILE)" -docker build -f "$DOCKERFILE" -t "nicolasdorier/nbxplorer:2.2.20" . +docker build -f "$DOCKERFILE" -t "nicolasdorier/nbxplorer:2.3.4" . cd - && cd .. diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index 91fab41..7b82f76 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -9,7 +9,7 @@ services: - "49392" environment: # BTCPay settings - BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest} + BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Application Name=btcpayserver;Database=btcpayserver${NBITCOIN_NETWORK:-regtest} BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} diff --git a/docker-compose-generator/docker-fragments/nbxplorer.yml b/docker-compose-generator/docker-fragments/nbxplorer.yml index afea4b8..cf5f7ba 100644 --- a/docker-compose-generator/docker-fragments/nbxplorer.yml +++ b/docker-compose-generator/docker-fragments/nbxplorer.yml @@ -4,7 +4,7 @@ services: nbxplorer: restart: unless-stopped - image: nicolasdorier/nbxplorer:2.2.20 + image: nicolasdorier/nbxplorer:2.3.4 expose: - "32838" environment: @@ -12,6 +12,11 @@ services: NBXPLORER_BIND: 0.0.0.0:32838 NBXPLORER_TRIMEVENTS: 10000 NBXPLORER_SIGNALFILESDIR: /datadir + NBXPLORER_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Application Name=nbxplorer;MaxPoolSize=20;Database=nbxplorer${NBITCOIN_NETWORK:-regtest} + NBXPLORER_AUTOMIGRATE: 1 + NBXPLORER_NOMIGRATEEVTS: 1 + links: + - postgres volumes: - "nbxplorer_datadir:/datadir"