btcpayserver-docker icon indicating copy to clipboard operation
btcpayserver-docker copied to clipboard

Suggestion: Allow Multi-Instance support in docker-compose

Open petzsch opened this issue 2 years ago • 0 comments

As a tester, I would like to be able to deploy multiple btcpayserver instances using the same infrastructure (bitcoind, lnd, nbxplorer, traefik, postgres) on one server.

@Kukks and I have been throwing some ideas back and forth on this. Currently I've deployed the entire btcpayserver stack multiple times with docker-swarm using different ports for lnd. This is not verry ressource efficient.

Here are some of the ideas we had on this:

  • Extend btcpay-up.sh to run docker up --build so that included source folders get included in the stack (as seen here: https://github.com/petzsch/btcpayserver-testing/blob/main/Vagrantfile#L98 and here: https://github.com/petzsch/btcpayserver-testing/blob/main/Vagrantfile#L115)
  • have a script accepting a git url and branch name using a fragment to add to the docker-compose with a unique domain name (use wildcard dns record for this)
  • BTCPayServer automatically populates it's database, if that is empty. So this should be straight forward.
  • instead of using the same LND connection string, we could create a new lnbank wallet on the main instance and use that for testing (so that server admins do not share direct access to the One LND main wallet)

If this idea turns into something working, we could include this as Github Action on the main repo to deploy new instances for every pull request using a slash command, as done in this repo: https://github.com/StephenClearyExamples/PullRequestStaging

Feel free to add your ideas to this.

The goal would be to become the "voltage killer app" 🤣

petzsch avatar May 10 '22 07:05 petzsch