-
-
Notifications
You must be signed in to change notification settings - Fork 169
Description
Is your feature request related to a problem? Please describe.
I am trying out LND's remote db backend support (using postgres). However, since I cannot just via the GUI add a postgres service (or any other external service that may be supported in the future) and supporting each such service feels a bit overkill, I was thinking about an easy way to handle this better.
Describe the solution you'd like
It may therefore be nice to be able to define a persistent external docker network that must be used for a Polar environment, instead of Polar creating and deleting a specific default network with each start and stop. This would allow for additional services (e.g. postgres) to be spun up external/independent to Polar, while the nodes in the polar environment can make use of it.
Additional context
Currently I have solved this by creating a standalone docker-compose file that spins up postgres and uses the docker network created by Polar automatically (e.g. 2_default for environment 2).
This requires that I always first start Polar, as otherwise the network will not be created.
When I want to stop the environment I have to first stop postgres, as Polar will try to delete the network it created when pressing the STOP button, which is impossible if any service is still running in this network.
Docker-compose file for my postgres service, which assumes polar network 2 exists:
version: '3.3'
services:
postgres1:
image: postgres:latest
container_name: polar-n2-postgres1
hostname: postgres1
restart: always
volumes:
- ./networks/2/volumes/db/postgres1:/var/lib/postgresql/data
expose:
- '5432'
ports:
- '45432:5432'
environment:
POSTGRES_PASSWORD: lnd
POSTGRES_USER: lnd
networks:
default:
external: true
name: 2_default