Skip to content

Commit

Permalink
Nodejs update for CI & Docker and updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
saubyk authored and ShahanaFarooqui committed Dec 7, 2023
1 parent 43a46b6 commit ea7f300
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 34 deletions.
Binary file modified .DS_Store
Binary file not shown.
36 changes: 18 additions & 18 deletions .github/docs/Core_lightning_setup.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![](../screenshots/RTL-CLN-Dashboard.png)
![](../screenshots/RTL-CLN-Arch-3.png)

## RTL Core lightning setup

Expand All @@ -10,16 +10,16 @@
* [Start the server and access the app](#start)

### <a name="intro"></a>Introduction
RTL is now enabled to manage lightning nodes running Core Lightning.
RTL is now enabled to manage lightning nodes running Core Lightning

Follow the below steps to install and setup RTL to run on Core Lightning.
Follow the below steps to install and setup RTL to run on Core Lightning

### <a name="prereq"></a>Pre-requisites:
1. Functioning Core Lightning node. Follow install instructions on their [github](https://github.com/ElementsProject/lightning)
2. NodeJS - Can be downloaded [here](https://nodejs.org/en/download)
3. clnrest - Ensure that core lightning's `clnrest` API server is configured. Configuration instructions [here](https://docs.corelightning.org/docs/rest#configuration)
4. Create/reuse a rune created by core-lightning. Check [`createrune`](https://docs.corelightning.org/reference/lightning-createrune) and [`showrunes`](https://docs.corelightning.org/reference/lightning-showrunes) commands documentation for more details.
4. Copy the `rune` and save it in a file named `.commando`, on which RTL will be installed.
3. CLNRest - Ensure that core lightning's `CLNRest` API server is configured. Configuration instructions [here](https://docs.corelightning.org/docs/rest#configuration)
4. Create/reuse core-lightning's rune. Check [`createrune`](https://docs.corelightning.org/reference/lightning-createrune) and [`showrunes`](https://docs.corelightning.org/reference/lightning-showrunes) documentation for more details on how to create runes
4. Copy the `rune` and save it in a file which must be accessible to RTL. The content of the file must be `LIGHTNING_RUNE="<your-rune>"`

### <a name="arch"></a>Architecture
![](../screenshots/RTL-CLN-Arch-2.png)
Expand Down Expand Up @@ -49,17 +49,17 @@ $ npm install --omit=dev
If there is an error with `upstream dependency conflict` message then replace `npm install --omit=dev` with `npm install --omit=dev --legacy-peer-deps`.

### <a name="prep"></a>Prep for Execution
RTL requires its own config file `RTL-Config.json`, to start the server and provide user authentication on the app.
* Rename the file `Sample-RTL-Config.json` to `RTL-Config.json` located at`./RTL`..
* Locate the complete path of the readable `.commando` file on your node.
RTL requires its own config file `RTL-Config.json`, to start the server and provide user authentication on the app
* Rename the file `Sample-RTL-Config.json` to `RTL-Config.json` located at`./RTL`
* Locate the complete path of the readable `.commando` file on your node
* Modify the RTL conf file per the example file below

Ensure that the follow values are correct per your config:
* `lnImplementation` - This should be `CLN`, indicating that RTL is connecting to a core lightning node.
* `runePath` - Path of the folder including filename which contains `rune` for the node. This rune in the file should be saved in `LIGHTNING_RUNE="your-rune"` format.
* `lnServerUrl` - complete url with ip address and port of the cl-rest server.
* `multiPass` - Specify the password (in plain text) to access RTL. This password will be hashed and not stored as plain text.
* `configPath` (optional) - File path of the core lightning config file, if RTL server is local to the core lightning server.
* `lnImplementation` - This should be `CLN`, indicating that RTL is connecting to a core lightning node
* `runePath` - Path of the folder including **filename** which contains the `rune` for the node. The content of the file must be `LIGHTNING_RUNE="<your-rune>"`
* `lnServerUrl` - complete url with ip address and port of the CLNRest server
* `multiPass` - Specify the password (in plain text) to access RTL. This password will be hashed and not stored as plain text
* `configPath` (optional) - File path of the core lightning config file, if RTL server is local to the core lightning server

```
{
Expand Down Expand Up @@ -89,7 +89,7 @@ Ensure that the follow values are correct per your config:
"logLevel": "INFO",
"fiatConversion": false,
"unannouncedChannels": false,
"lnServerUrl": "https://<cl-rest api server ip address>:3001"
"lnServerUrl": "https://<CLNRest api server ip address>:3001"
}
}
]
Expand All @@ -102,9 +102,9 @@ Run the following command:

If the server started successfully, you should get the below output on the console:

`$ Server is up and running, please open the UI at http://localhost:3000 or your proxy configured url.`
`$ Server is up and running, please open the UI at http://localhost:3000 or your proxy configured url`

Open your browser at the following address: http://localhost:3000 to access the RTL app.
Open your browser at the following address: http://localhost:3000 to access the RTL app

### Detailed config and instructions
For detailed config and access options and other information, view the main readme page.
For detailed config and access options and other information, view the main readme page
Binary file added .github/screenshots/RTL-CLN-Arch-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Install NPM dependencies
if: steps.cache-npm-packages.outputs.cache-hit != 'true'
run: npm ci --legacy-peer-deps
run: npm ci

lint:
name: Lint
Expand All @@ -57,7 +57,7 @@ jobs:

- name: Install NPM dependencies
if: steps.cache-npm-packages.outputs.cache-hit != 'true'
run: npm ci --legacy-peer-deps
run: npm ci

- name: Lint Scripts
run: npm run lint
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:

- name: Install NPM dependencies
if: steps.cache-npm-packages.outputs.cache-hit != 'true'
run: npm ci --legacy-peer-deps
run: npm ci

- name: Run tests
run: npm run test
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

- name: Install NPM dependencies
if: steps.cache-npm-packages.outputs.cache-hit != 'true'
run: npm ci --legacy-peer-deps
run: npm ci

- name: Cache build frontend
uses: actions/cache@v2
Expand Down
8 changes: 4 additions & 4 deletions dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# ---------------
# Install Dependencies
# ---------------
FROM node:16-alpine as builder
FROM node:18-alpine as builder

WORKDIR /RTL

COPY package.json /RTL/package.json
COPY package-lock.json /RTL/package-lock.json

RUN npm install --legacy-peer-deps
RUN npm install

# ---------------
# Build App
Expand All @@ -22,12 +22,12 @@ RUN npm run buildfrontend
RUN npm run buildbackend

# Remove non production necessary modules
RUN npm prune --production --legacy-peer-deps
RUN npm prune --production

# ---------------
# Release App
# ---------------
FROM node:16-alpine as runner
FROM node:18-alpine as runner

WORKDIR /RTL

Expand Down
8 changes: 4 additions & 4 deletions dockerfiles/Dockerfile.arm32v7
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---------------
# Install Dependencies
# ---------------
FROM node:16-stretch-slim as builder
FROM node:18-alpine 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
Expand All @@ -12,7 +12,7 @@ WORKDIR /RTL
COPY package.json /RTL/package.json
COPY package-lock.json /RTL/package-lock.json

RUN npm install --legacy-peer-deps
RUN npm install

# ---------------
# Build App
Expand All @@ -26,12 +26,12 @@ RUN npm run buildfrontend
RUN npm run buildbackend

# Remove non production necessary modules
RUN npm prune --production --legacy-peer-deps
RUN npm prune --production

# ---------------
# Release App
# ---------------
FROM arm32v7/node:16-stretch-slim as runner
FROM arm32v7/node:18-alpine as runner

WORKDIR /RTL

Expand Down
8 changes: 4 additions & 4 deletions dockerfiles/Dockerfile.arm64v8
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ---------------
# Install Dependencies
# ---------------
FROM node:16-stretch-slim as builder
FROM node:18-alpine as builder

ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini-static-arm64 /tini
RUN chmod +x /tini
Expand All @@ -11,7 +11,7 @@ WORKDIR /RTL
COPY package.json /RTL/package.json
COPY package-lock.json /RTL/package-lock.json

RUN npm install --legacy-peer-deps
RUN npm install

# ---------------
# Build App
Expand All @@ -25,12 +25,12 @@ RUN npm run buildfrontend
RUN npm run buildbackend

# Remove non production necessary modules
RUN npm prune --production --legacy-peer-deps
RUN npm prune --production

# ---------------
# Release App
# ---------------
FROM arm64v8/node:16-stretch-slim as runner
FROM arm64v8/node:18-alpine as runner

WORKDIR /RTL

Expand Down

0 comments on commit ea7f300

Please sign in to comment.