Pipenv/fix install loguru (#732)

* update pipfile

* pipenv workflow

* pipfile jinja

* Pipfile installs dev files

* python3.8 tests only

* version tag yaml

* all tests

* pipenv with pip

* only 3.7

* activate env

* test-pipenv

* pipenv importlib_metadata

* importlib-metadata

* 3.8

* 3.7 only oops

* merge install guides

* install guide in README
This commit is contained in:
calle 2022-07-13 01:15:48 +02:00 committed by GitHub
parent 357860d849
commit 1f13bdeb2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 713 additions and 634 deletions

View file

@ -7,46 +7,10 @@ nav_order: 1
# Installation
LNbits uses [Pipenv][pipenv] to manage Python packages.
This guide has been moved to the [installation guide](../guide/installation.md).
To install the developer packages, use `pipenv install --dev`.
```sh
git clone https://github.com/lnbits/lnbits-legend.git
cd lnbits-legend/
## Notes:
sudo apt-get install pipenv
pipenv shell
# pipenv --python 3.9 shell (if you wish to use a version of Python higher than 3.7)
pipenv install --dev
# pipenv --python 3.9 install --dev (if you wish to use a version of Python higher than 3.7)
# If any of the modules fails to install, try checking and upgrading your setupTool module
# pip install -U setuptools
# install libffi/libpq in case "pipenv install" fails
# sudo apt-get install -y libffi-dev libpq-dev
```
## Running the server
Create the data folder and edit the .env file:
mkdir data
cp .env.example .env
sudo nano .env
To then run the server for development purposes (includes hot-reload), use:
pipenv run python -m uvicorn lnbits.__main__:app --host 0.0.0.0 --reload
For production, use:
pipenv run python -m uvicorn lnbits.__main__:app --host 0.0.0.0
You might also need to install additional packages, depending on the [backend wallet](../guide/wallets.md) you use.
E.g. when you want to use LND you have to `pipenv run pip install lndgrpc` and `pipenv run pip install purerpc`.
Take a look at [Polar][polar] for an excellent way of spinning up a Lightning Network dev environment.
**Notes**:
* We reccomend using <a href="https://caddyserver.com/docs/install#debian-ubuntu-raspbian">Caddy</a> for a reverse-proxy if you want to serve your install through a domain, alternatively you can use [ngrok](https://ngrok.com/).
* We recommend using <a href="https://caddyserver.com/docs/install#debian-ubuntu-raspbian">Caddy</a> for a reverse-proxy if you want to serve your install through a domain, alternatively you can use [ngrok](https://ngrok.com/).
* <a href="https://linuxize.com/post/how-to-use-linux-screen/#starting-linux-screen">Screen</a> works well if you want LNbits to continue running when you close your terminal session.