Skip to content

Docker examples or documentation #119

@KayBeSee

Description

@KayBeSee

Are there any examples of how to run this as a docker container?

I am using the following docker-compose.yml file but keep getting an error about a connection to /root/.lightning being refused.

version: "3.8"

services:
  rest:
    image: saubyk/c-lightning-rest:0.7.2
    ports:
      - "3001:3001"
      - "4001:4001"
    volumes:
      - ./data/lightning:/root/.lightning
  lightning:
    image: elementsproject/lightningd:latest
    command:
      - --bitcoin-rpcconnect=bitcoind
      - --network=regtest
      - --alias=myawesomenode
      - --log-level=debug
      - --grpc-port=8001
    volumes:
      - ./data/lightning:/root/.lightning
      - ./data/bitcoin:/root/.bitcoin
    ports:
      - "8001:8001"

  bitcoind:
    image: lncm/bitcoind:v22.0@sha256:37a1adb29b3abc9f972f0d981f45e41e5fca2e22816a023faa9fdc0084aa4507
    volumes:
      - ${PWD}/data/bitcoin:/data/.bitcoin
    restart: on-failure
    ports:
      - "18443:18443"

Errors:

rest_1       | Reading config file
rest_1       | warn: --- Starting the cl-rest server ---
rest_1       | Generating a RSA private key
rest_1       | ............................+++++
rest_1       | ...............................................................................+++++
rest_1       | writing new private key to './certs/key.tmp.pem'
rest_1       | -----
rest_1       | writing RSA key
rest_1       | warn: --- cl-rest api server is ready and listening on port: 3001 ---
rest_1       | warn: --- cl-rest doc server is ready and listening on port: 4001 ---
rest_1       | error: Lightning client connection error
rest_1       | events.js:291
rest_1       |       throw er; // Unhandled 'error' event
rest_1       |       ^
rest_1       |
rest_1       | Error: connect ECONNREFUSED /root/.lightning
rest_1       |     at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
rest_1       | Emitted 'error' event on LightningClient instance at:
rest_1       |     at Socket.<anonymous> (/usr/src/app/lightning-client-js.js:77:23)
rest_1       |     at Socket.emit (events.js:314:20)
rest_1       |     at emitErrorNT (internal/streams/destroy.js:92:8)
rest_1       |     at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
rest_1       |     at processTicksAndRejections (internal/process/task_queues.js:84:21) {
rest_1       |   errno: 'ECONNREFUSED',
rest_1       |   code: 'ECONNREFUSED',
rest_1       |   syscall: 'connect',
rest_1       |   address: '/root/.lightning'
rest_1       | }
clightning_rest_1 exited with code 1

Any ideas of what settings to use here to get c-lightning-REST talking with c-lightning?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions