chore: remove gunicorn and gevent from minimum requirements

It is now up to the user to install these (or other) for production deployment.
More info: https://flask.palletsprojects.com/en/1.1.x/tutorial/deploy/#run-with-a-production-server
This commit is contained in:
Eneko Illarramendi 2020-09-03 19:53:22 +02:00
parent dcd3f80974
commit a651f747ac
11 changed files with 66 additions and 90 deletions

View file

@ -1,7 +1,7 @@
---
layout: default
title: For developers
nav_order: 3
nav_order: 4
has_children: true
---

View file

@ -22,24 +22,27 @@ While in development, you will need to install all dependencies:
$ pipenv shell
$ pipenv install --dev
```
If you wish to use a version of Python higher than 3.7:
```sh
$ pipenv --python 3.8 install --dev
```
You will need to set the variables in `.env.example`, and rename the file to `.env`.
![Files](https://i.imgur.com/ri2zOe8.png)
You might also need to install additional packages, depending on the [backend wallets](../guide/wallets.md) you configured.
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 lnd-grpc`.
Take a look at [Polar](https://lightningpolar.com/) for an excellent way of spinning up a Lightning Network dev environment.
Take a look at [Polar][polar] for an excellent way of spinning up a Lightning Network dev environment.
Running the server
------------------
LNbits uses [Flask](http://flask.pocoo.org/) as an application server.
LNbits uses [Flask][flask] as an application server.
```sh
$ pipenv run flask migrate
@ -49,10 +52,14 @@ $ pipenv run flask run
There is an environment variable called `FLASK_ENV` that has to be set to `development`
if you want to run Flask in debug mode with autoreload
[pipenv]: https://pipenv.pypa.io/
Frontend
--------
The views are build using [Vue.js and Quasar](https://quasar.dev/start/how-to-use-vue).
The frontend uses [Vue.js and Quasar][quasar].
[flask]: http://flask.pocoo.org/
[pipenv]: https://pipenv.pypa.io/
[polar]: https://lightningpolar.com/
[quasar]: https://quasar.dev/start/how-to-use-vue

View file

@ -0,0 +1,34 @@
---
layout: default
title: Basic installation
nav_order: 2
---
Basic installation
==================
Download this repo and install the dependencies:
```sh
$ git clone https://github.com/lnbits/lnbits.git
$ python3 -m venv .venv
$ source ./.venv/bin/activate
(.venv) $ pip install -r requirements.txt
```
You will need to set the variables in `.env.example`, and rename the file to `.env`.
Run the migrations and the Flask server:
```sh
(.venv) $ flask migrate
(.venv) $ flask run
```
You might also need to install additional packages, depending on the [backend wallet](./wallets.md) you use.
E.g. when you want to use LND you have to run:
```sh
(.venv) $ pip install lnd-grpc
```

View file

@ -1,7 +1,7 @@
---
layout: default
title: Backend wallets
nav_order: 2
nav_order: 3
---
@ -53,7 +53,7 @@ Using this wallet requires the installation of the `lnd-grpc` Python package.
### LNbits
- `LNBITS_BACKEND_WALLET_CLASS`: **LNbitsWallet**
- `LNBITS_ENDPOINT`: ex. https://lnbits.com
- `LNBITS_ENDPOINT`: e.g. https://lnbits.com
- `LNBITS_ADMIN_KEY`: apiKey
- `LNBITS_INVOICE_KEY`: apiKey
@ -61,7 +61,7 @@ Using this wallet requires the installation of the `lnd-grpc` Python package.
### LNPay
- `LNBITS_BACKEND_WALLET_CLASS`: **LNPayWallet**
- `LNPAY_API_ENDPOINT`: ex. https://lnpay.co/v1/
- `LNPAY_API_ENDPOINT`: https://lnpay.co/v1/
- `LNPAY_API_KEY`: apiKey
- `LNPAY_ADMIN_KEY`: apiKey
- `LNPAY_INVOICE_KEY`: apiKey
@ -71,7 +71,7 @@ Using this wallet requires the installation of the `lnd-grpc` Python package.
### lntxbot
- `LNBITS_BACKEND_WALLET_CLASS`: **LntxbotWallet**
- `LNTXBOT_API_ENDPOINT`: ex. https://lntxbot.bigsun.xyz/
- `LNTXBOT_API_ENDPOINT`: https://lntxbot.bigsun.xyz/
- `LNTXBOT_ADMIN_KEY`: apiKey
- `LNTXBOT_INVOICE_KEY`: apiKey
@ -79,6 +79,6 @@ Using this wallet requires the installation of the `lnd-grpc` Python package.
### OpenNode
- `LNBITS_BACKEND_WALLET_CLASS`: **OpenNodeWallet**
- `OPENNODE_API_ENDPOINT`: ex. https://api.opennode.com/
- `OPENNODE_API_ENDPOINT`: https://api.opennode.com/
- `OPENNODE_ADMIN_KEY`: apiKey
- `OPENNODE_INVOICE_KEY`: apiKey