Skip to content

Instantly share code, notes, and snippets.

@JFrankfurt
Created October 27, 2018 21:08
Show Gist options
  • Save JFrankfurt/6ba297b0eb1c63b84a62dde20ea25514 to your computer and use it in GitHub Desktop.
Save JFrankfurt/6ba297b0eb1c63b84a62dde20ea25514 to your computer and use it in GitHub Desktop.
lnd btcd
version: '2'
services:
app:
build:
context: ./
dockerfile: server/Dockerfile
restart: always
ports:
- "8080:8080"
volumes:
- ./server/src:/server/src
- ./server/.env:/server/.env
- lnd_data:/data
links:
- mongo
environment:
- GRPC_VERBOSITY=DEBUG
- GRPC_TRACE=all
mongo:
image: 'mongo:3.6.3'
working_dir: '/home/db'
# btc is an image of bitcoin node which used as base image for btcd and
# btccli. The environment variables default values determined on stage of
# container start within starting script.
btc:
image: btcd
build:
context: docker/btcd
volumes:
- shared:/rpc
- bitcoin:/data
environment:
- RPCUSER
- RPCPASS
- NETWORK
btcd:
extends: btc
container_name: btcd
environment:
- DEBUG
- MINING_ADDRESS
entrypoint: ["./start-btcd.sh"]
lnd:
image: lnd
build:
context: ./
dockerfile: docker/lnd/Dockerfile
environment:
- RPCUSER
- RPCPASS
- NETWORK
- CHAIN
- DEBUG
volumes:
- shared:/rpc
- lnd_data:/data
entrypoint: ["./start-lnd.sh"]
btcctl:
extends: btc
container_name: btcctl
links:
- "btcd:rpcserver"
entrypoint: ["./start-btcctl.sh"]
volumes:
lnd_data:
driver: local
# shared volume is need to store the btcd rpc certificates and use it within
# btcctl and lnd containers.
shared:
driver: local
# bitcoin volume is needed for maintaining blockchain persistence
# during btcd container recreation.
bitcoin:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment