Add fly.io deployment notes

This commit is contained in:
bumi 2022-08-19 10:55:00 +02:00
parent a383a747ef
commit a21e8b96b7
2 changed files with 75 additions and 4 deletions

View File

@ -141,7 +141,41 @@ This buildpack can be disabled and removed if not needed or desired, through the
Lastly, using the Heroku deployment, you can link the app to your own domain by following the directions here: https://help.heroku.com/MTG1BIA7/how-do-i-connect-a-domain-to-my-heroku-app
### Deployment Notes
### Fly.io
#### 0. Clone the repo
$ git clone https://github.com/bumi/lnme.git
$ cd lnme
#### 1. Create a new app
$ flyctl launch --generate-name // or set a custom app name: flyctl launch --name lnme-test-1
You will be asked a few things:
* Copy the configuration to the new app
* You do NOT need to create a Postgresql Database
* Do NOT deploy it directly, we first need to set some configs
#### 2. Set the configuration using environment variables:
The LND config variablse are required. Others are optional:
$ flyctl secrets set LNME_LND_ADDRESS="xxx.xxx.xxx.xxx:10009" LNME_LND_CERT=xxx LNME_LND_MACAROON=xxx
$ flyctl secrets set DISABLE_WEBSITE=1 // etc.
#### 3. Launch the app:
$ flyctl deploy
#### 4.Configure your domain
To configure a custom domain check the [fly.io guides](https://fly.io/docs/app-guides/custom-domains-with-fly/)
### Custom deployment notes
To run LnMe as systemd service have a look at the [systemd service example config](https://github.com/bumi/lnme/blob/master/examples/lnme.service)
@ -174,7 +208,7 @@ if you got the Lightning Address enabled you also get a LNURL-pay URL:
https://`{your domain}/lnurlp/{anything}`
If you need an bech32 encoded version you can use this online tool: [https://lnurl.fiatjaf.com/codec/](https://lnurl.fiatjaf.com/codec/)
If you need an bech32 encoded version you can use this online tool: [https://lnurl.fiatjaf.com/codec/](https://lnurl.fiatjaf.com/codec/)
### Customize your ⚡ website
@ -188,8 +222,8 @@ Take a look at the [embedded default website](https://github.com/bumi/lnme/blob/
### Usage with 21 Payment Widgets
[widgets.twentyuno.net](https://widgets.twentyuno.net/) is a beautiful embeddable payment widget for any existing website.
You can use your LnMe instance with the widget by using your [LnMe LNURL](https://github.com/bumi/lnme#lnurl) with the widget.
[widgets.twentyuno.net](https://widgets.twentyuno.net/) is a beautiful embeddable payment widget for any existing website.
You can use your LnMe instance with the widget by using your [LnMe LNURL](https://github.com/bumi/lnme#lnurl) with the widget.
Use your bech32 encoded [LNURL](https://github.com/bumi/lnme#lnurl) as `Receiver` in the [widget configuration](https://widgets.twentyuno.net/get-started)

37
fly.toml Normal file
View File

@ -0,0 +1,37 @@
# fly.toml file generated
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[env]
[experimental]
allowed_public_ports = []
auto_rollback = true
[[services]]
http_checks = []
internal_port = 1323
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"