lightning-terminal/docs/compile.md

96 lines
4.4 KiB
Markdown
Raw Normal View History

Simplified readme (#129) Update README, simplify documentation Simplified to focus on the happy path * Connect to remote instance Instructions for connecting Terminal to a remote LND instance. * Add link to remote instance Link to new instructions for connecting Terminal to a remote LND instance. * Create build from source instructions Parse out the building from source instructions into a separate doc to simplify main README file. * Change configuration section Update configuration section to acknowledge ability to upgrade an LND instance to Terminal * Add upgrading section Ensure that there is a clear upgrade path for existing users that have modified their lnd.conf files to be compatible with Terminal * Reference integrated configuration doc Change configuration section to point to the integrate mode configuration doc. * Reference remote mode instructions In case the user needs further information point them to the more comprehensive instructions * Update configuration settings Change configuration settings to be more accurate and specific * Update compatibility Changed to v0.11.0-beta * Update README Add list of features and Daemon Versions table * Combine config links Put remote and integrated modes together but separate. * Create troubleshooting doc Specific information for troubleshooting * Add troubleshooting section Link out to the troubleshooting guide * Update configuration to interaction Make it more explicit as to what problem is being solved * Add quickstart section Quickstart section for those wanting to connect LiT with a standalone process on a remote host * Combine remote configs into one Reference the single remote config doc instead of chained docs. * Update doc/config-lnd-remote.md * Remove commands for downloading Sort of overkill in terms of info * Update README Add small changes to README to address comments * Update compile Address small nits * Update uipassword Make it clearer the password needs to be changed * Update with build tags Added build tags for LND since it is most likely the case that LND was built without tags.
2020-10-13 09:49:20 -10:00
## Compile from Source Code
To compile from source code, you'll need to have some prerequisite developer tooling
installed on your machine.
| Dependency | Description |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [golang](https://golang.org/doc/install) | LiT's backend web server is written in Go. The minimum version supported is Go v1.16. |
Simplified readme (#129) Update README, simplify documentation Simplified to focus on the happy path * Connect to remote instance Instructions for connecting Terminal to a remote LND instance. * Add link to remote instance Link to new instructions for connecting Terminal to a remote LND instance. * Create build from source instructions Parse out the building from source instructions into a separate doc to simplify main README file. * Change configuration section Update configuration section to acknowledge ability to upgrade an LND instance to Terminal * Add upgrading section Ensure that there is a clear upgrade path for existing users that have modified their lnd.conf files to be compatible with Terminal * Reference integrated configuration doc Change configuration section to point to the integrate mode configuration doc. * Reference remote mode instructions In case the user needs further information point them to the more comprehensive instructions * Update configuration settings Change configuration settings to be more accurate and specific * Update compatibility Changed to v0.11.0-beta * Update README Add list of features and Daemon Versions table * Combine config links Put remote and integrated modes together but separate. * Create troubleshooting doc Specific information for troubleshooting * Add troubleshooting section Link out to the troubleshooting guide * Update configuration to interaction Make it more explicit as to what problem is being solved * Add quickstart section Quickstart section for those wanting to connect LiT with a standalone process on a remote host * Combine remote configs into one Reference the single remote config doc instead of chained docs. * Update doc/config-lnd-remote.md * Remove commands for downloading Sort of overkill in terms of info * Update README Add small changes to README to address comments * Update compile Address small nits * Update uipassword Make it clearer the password needs to be changed * Update with build tags Added build tags for LND since it is most likely the case that LND was built without tags.
2020-10-13 09:49:20 -10:00
| [nodejs](https://nodejs.org/en/download/) | LiT's frontend is written in TypeScript and built on top of the React JS web framework. To bundle the assets into Javascript & CSS compatible with web browsers, NodeJS is required. |
| [yarn](https://classic.yarnpkg.com/en/docs/install) | A popular package manager for NodeJS application dependencies. |
Once you have the necessary prerequisites, LiT can be compiled by running the following
commands:
```shell script
$ git clone https://github.com/lightninglabs/lightning-terminal.git
$ cd lightning-terminal
$ make install
```
This will produce the `litd` executable and add it to your `GOPATH`. The CLI binaries for
2020-11-02 13:15:22 +01:00
`lncli`, `loop`, `pool`, and `frcli` are not created by `make install`. You will
need to download those binaries from the
[lnd](https://github.com/lightningnetwork/lnd/releases),
[loop](https://github.com/lightninglabs/loop/releases),
[pool](https://github.com/lightninglabs/pool/releases), and
Simplified readme (#129) Update README, simplify documentation Simplified to focus on the happy path * Connect to remote instance Instructions for connecting Terminal to a remote LND instance. * Add link to remote instance Link to new instructions for connecting Terminal to a remote LND instance. * Create build from source instructions Parse out the building from source instructions into a separate doc to simplify main README file. * Change configuration section Update configuration section to acknowledge ability to upgrade an LND instance to Terminal * Add upgrading section Ensure that there is a clear upgrade path for existing users that have modified their lnd.conf files to be compatible with Terminal * Reference integrated configuration doc Change configuration section to point to the integrate mode configuration doc. * Reference remote mode instructions In case the user needs further information point them to the more comprehensive instructions * Update configuration settings Change configuration settings to be more accurate and specific * Update compatibility Changed to v0.11.0-beta * Update README Add list of features and Daemon Versions table * Combine config links Put remote and integrated modes together but separate. * Create troubleshooting doc Specific information for troubleshooting * Add troubleshooting section Link out to the troubleshooting guide * Update configuration to interaction Make it more explicit as to what problem is being solved * Add quickstart section Quickstart section for those wanting to connect LiT with a standalone process on a remote host * Combine remote configs into one Reference the single remote config doc instead of chained docs. * Update doc/config-lnd-remote.md * Remove commands for downloading Sort of overkill in terms of info * Update README Add small changes to README to address comments * Update compile Address small nits * Update uipassword Make it clearer the password needs to be changed * Update with build tags Added build tags for LND since it is most likely the case that LND was built without tags.
2020-10-13 09:49:20 -10:00
[faraday](https://github.com/lightninglabs/faraday/releases) repos manually.
2020-11-25 15:59:24 +01:00
## Building a docker image
There are two flavors of Dockerfiles available:
- `Dockerfile`: Used for production builds. Checks out the source code from
GitHub during build. The build argument `--build-arg checkout=v0.x.x-alpha`
can be used to specify what git tag or commit to check out before building.
- `dev.Dockerfile` Used for development or testing builds. Uses the local code
when building and allows local changes to be tested more easily.
### Building a development docker image
Follow the instructions of the [previous chapter](#compile-from-source-code) to
install all necessary dependencies.
Then, instead of `make install` run the following commands:
```shell script
$ docker build -f dev.Dockerfile -t my-lit-dev-image .
```
If successful, you can then run the docker image with:
```shell script
$ docker run -p 8443:8443 --rm --name litd my-lit-dev-image \
--httpslisten=0.0.0.0:8443 \
... (your configuration flags here)
```
See the [execution section in the main README](../README.md#execution) to find
out what configuration flags to use.
### Building a production docker image
To create a production build, you need to specify the git tag to create the
image from. All local files will be ignored, everything is cloned and built from
GitHub so you don't need to install any dependencies:
```shell script
$ docker build -t lightninglabs/lightning-terminal --build-arg checkout=v0.3.2-alpha .
```
### Compiling gRPC proto files
When the gRPC protocol buffer definition files for `lnd` or `loop` are
updated with new releases, the [generated](../src/types/generated/) JS/TS files should be
updated as well. This should only be done when the versions of the daemons packaged in
Terminal are updated.
To compile the proto files into JS/TS code, follow the following steps:
1. Install `docker` if you do not already have it installed. Follow the
instructions in [this guide](https://docs.docker.com/get-docker/).
1. Run the following command to download the proto files from each repo and
compile the JS/TS code using the updated protos.
```shell
$ make protos
```
1. Fix any typing, linting, or unit test failures introduced by the update. Run the
commands below to find and fix these errors in the app code.
```shell script
$ cd app
$ yarn tsc
$ yarn lint
$ yarn test:ci
```
1. Once all errors have been resolved, commit your changes and open a PR