mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2026-08-13 12:33:07 +02:00
parent
cf66708df9
commit
bea5980c6f
865 changed files with 49679 additions and 20273 deletions
|
|
@ -1,19 +0,0 @@
|
|||
FROM node:14-alpine
|
||||
|
||||
RUN apk add --no-cache tini
|
||||
|
||||
WORKDIR /RTL
|
||||
|
||||
COPY package.json /RTL/package.json
|
||||
COPY package-lock.json /RTL/package-lock.json
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install --production
|
||||
|
||||
COPY . /RTL
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "-g", "--"]
|
||||
|
||||
CMD ["node", "rtl"]
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
FROM node:14-stretch-slim AS builder
|
||||
|
||||
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini-static-armel /tini
|
||||
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini-static-armel.asc /tini.asc
|
||||
# RUN apt-get install gnupg
|
||||
# RUN gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 \
|
||||
# && gpg --batch --verify /tini.asc /tini
|
||||
RUN chmod +x /tini
|
||||
|
||||
WORKDIR /RTL
|
||||
|
||||
COPY . /RTL
|
||||
|
||||
COPY package.json /RTL/package.json
|
||||
COPY package-lock.json /RTL/package-lock.json
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install --production
|
||||
|
||||
COPY . /RTL
|
||||
|
||||
FROM arm32v7/node:14-stretch-slim
|
||||
|
||||
WORKDIR /RTL
|
||||
|
||||
COPY --from=builder "/RTL" .
|
||||
COPY --from=builder "/tini" /sbin/tini
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "-g", "--"]
|
||||
|
||||
CMD ["node", "rtl"]
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
FROM node:14-stretch-slim AS builder
|
||||
|
||||
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini-static-arm64 /tini
|
||||
RUN chmod +x /tini
|
||||
|
||||
WORKDIR /RTL
|
||||
|
||||
COPY . /RTL
|
||||
|
||||
COPY package.json /RTL/package.json
|
||||
COPY package-lock.json /RTL/package-lock.json
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install --production
|
||||
|
||||
COPY . /RTL
|
||||
|
||||
FROM arm64v8/node:14-stretch-slim
|
||||
|
||||
WORKDIR /RTL
|
||||
|
||||
COPY --from=builder "/RTL" .
|
||||
COPY --from=builder "/tini" /sbin/tini
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "-g", "--"]
|
||||
|
||||
CMD ["node", "rtl"]
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# RTL Docker Dev Setup
|
||||
# 1) RTL Docker Dev Setup
|
||||
|
||||
### This is not suitable for production deployments. ONLY FOR DEVELOPMENT.
|
||||
|
||||
|
|
@ -6,14 +6,16 @@ This `docker-compose` template launches `bitcoind`, `lnd` and `rtl` containers.
|
|||
|
||||
It is configured to run in **regtest** mode but can be modified to suit your needs.
|
||||
|
||||
### Notes
|
||||
### 1.1) Notes
|
||||
- `bitcoind` is built from an Ubuntu repository and should not be used in production.
|
||||
- `lnd` will not sync to chain until Bitcoin regtest blocks are generated (see below).
|
||||
- `rtl` image is from the Docker Hub repository but you can change this to your needs.
|
||||
- Various ports and configs can be adjusted in the `.env` or `docker-compose.yml` files.
|
||||
|
||||
## How to run
|
||||
It may take several minutes if containers need to be built. From the terminal in this folder:
|
||||
## 1.2) How to run
|
||||
It may take several minutes if containers need to be built.
|
||||
|
||||
1.2.1) From the terminal in this folder:
|
||||
|
||||
```
|
||||
$ docker-compose up -d bitcoind
|
||||
|
|
@ -21,18 +23,18 @@ $ bin/b-cli generate 101
|
|||
$ docker-compose up -d lnd rtl
|
||||
```
|
||||
|
||||
Check containers are up and running with:
|
||||
1.2.2) Check containers are up and running with:
|
||||
```
|
||||
$ docker-compose ps
|
||||
```
|
||||
|
||||
Use the cli tools to get responses from the containers:
|
||||
1.2.3) Use the cli tools to get responses from the containers:
|
||||
```
|
||||
$ bin/ln-cli getinfo
|
||||
$ bin/b-cli getblockchaininfo
|
||||
```
|
||||
|
||||
View daemon logs as follows:
|
||||
1.2.4) View daemon logs as follows:
|
||||
```
|
||||
$ docker-compose logs bitcoind lnd rtl
|
||||
```
|
||||
|
|
@ -46,6 +48,48 @@ When you are done you can destroy containers with:
|
|||
```
|
||||
$ docker-compose down -v
|
||||
```
|
||||
---
|
||||
# 2) Stand alone RTL Setup
|
||||
This is suitable when you already have a LND node running and configured.
|
||||
|
||||
## 2.1) From docker image pull
|
||||
```
|
||||
RTL_VERSION=0.12.0
|
||||
docker run --name rtl -d -it \
|
||||
-e RTL_CONFIG_PATH=/RTLConfig \
|
||||
-v /path/to/RTLConfig/dir:/RTLConfig \
|
||||
-v /path/to/macaroon/dir:/path/as/specified/in/RTLConfig \
|
||||
-v /path/to/database/dir:/RTL/database \
|
||||
-p 3000:3000/tcp \
|
||||
shahanafarooqui/rtl:${RTL_VERSION}
|
||||
```
|
||||
|
||||
## 2.2) From local docker build
|
||||
### 2.2.1) Build the image locally
|
||||
```
|
||||
RTL_VERSION=0.12.0
|
||||
docker build -t rtl:${RTL_VERSION} -f dockerfiles/Dockerfile .
|
||||
```
|
||||
### 2.2.2) Create .env file
|
||||
Create an environment file with your required configurations. Sample .env:
|
||||
```
|
||||
RTL_CONFIG_PATH=/RTLConfig
|
||||
MACAROON_PATH=/LNDMacaroon
|
||||
LN_SERVER_URL=https://host.docker.internal:8080
|
||||
|
||||
```
|
||||
|
||||
### 2.2.3) Run the newly built image with .env configurations
|
||||
```
|
||||
RTL_VERSION=0.12.0
|
||||
docker run -d -it \
|
||||
-v /path/to/RTLConfig/dir:/RTLConfig \
|
||||
-v /path/to/macaroon/dir:/LNDMacaroon \
|
||||
-v /path/to/database/dir:/RTL/database \
|
||||
--env-file=.env -p 3000:3000 rtl:${RTL_VERSION}
|
||||
```
|
||||
|
||||
Once the container is running you can access the RTL UI at http://localhost:3000
|
||||
|
||||
---
|
||||
@hashamadeus on Twitter
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ volumes:
|
|||
bitcoin_data:
|
||||
lightning_data:
|
||||
lightning_shared:
|
||||
rtl_db:
|
||||
|
||||
services:
|
||||
bitcoind:
|
||||
|
|
@ -101,12 +102,13 @@ services:
|
|||
|
||||
rtl:
|
||||
container_name: ${COMPOSE_PROJECT_NAME}_rtl
|
||||
image: shahanafarooqui/rtl:0.10.2
|
||||
image: shahanafarooqui/rtl:0.12.0
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- lnd
|
||||
volumes:
|
||||
- lightning_shared:/shared:ro
|
||||
- rtl_db:/database
|
||||
ports:
|
||||
- "${RTL_PORT}:${RTL_PORT}"
|
||||
environment:
|
||||
|
|
@ -126,3 +128,4 @@ services:
|
|||
RTL_CONFIG_PATH: /RTL
|
||||
BITCOIND_CONFIG_PATH: ''
|
||||
CHANNEL_BACKUP_PATH: /shared/lnd/backup
|
||||
ENABLE_OFFERS: false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue