dockerize the boltcard service with bundled postgres. updated readme accordingly
This commit is contained in:
parent
009d3e0c3a
commit
e83035e175
5 changed files with 121 additions and 1 deletions
|
|
@ -42,6 +42,7 @@ on the bolt card server
|
|||
- `./createboltcard -help` to see options
|
||||
- `./createboltcard -enable -tx_max=1000 -day_max=10000 -name=card_1` for example
|
||||
- this will give you a one-time link in text and QR code form
|
||||
- if the boltcard service is running in **docker**, use ```docker exec boltcard_main createboltcard/createboltcard``` instead
|
||||
|
||||
on the app
|
||||
- select `Key Management`
|
||||
|
|
@ -50,7 +51,7 @@ on the app
|
|||
- bring the card to the device for programming the keys
|
||||
|
||||
### Update the card record on the server
|
||||
on the bolt card server
|
||||
on the bolt card db server
|
||||
- `$ psql card_db`
|
||||
- `card_db=# select card_id, one_time_code from cards order by card_id desc limit 1;`
|
||||
- check that this is the correct record (one_time_code matches from before)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,40 @@
|
|||
1 GHz processor, 2 GB RAM, 10GB storage minimum
|
||||
Ubuntu 20.04 LTS server
|
||||
|
||||
## With docker & docker-compose
|
||||
### 1. Download the boltcard repository
|
||||
|
||||
`$ git clone https://github.com/boltcard/boltcard`
|
||||
|
||||
### 2. Get a macaroon and tls.cert from the lightning node
|
||||
|
||||
Create a macaroon with limited permissions to the lightning node
|
||||
[lncli download & install](https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md)
|
||||
```
|
||||
$ lncli \
|
||||
--rpcserver=lightning-node.io:10009 \
|
||||
--macaroonpath=admin.macaroon \
|
||||
--tlscertpath="tls.cert" \
|
||||
bakemacaroon uri:/routerrpc.Router/SendPaymentV2 > SendPaymentV2.macaroon.hex
|
||||
|
||||
$ xxd -r -p SendPaymentV2.macaroon.hex SendPaymentV2.macaroon
|
||||
```
|
||||
Copy tls.cert and SendPaymentV2.macaroon to your boltcard directory
|
||||
|
||||
### 3. Configure and run
|
||||
|
||||
Edit the .env file to your preference and run
|
||||
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
This will spin up a *postgresql* container, and the *boltcard service* container available at port **9000**. For publishing with a domain name and https, you can use a reverse proxy like nginx, traefik or caddy.
|
||||
|
||||
You can monitor with ```docker logs container_name```.
|
||||
|
||||
## Without docker
|
||||
|
||||
### login
|
||||
|
||||
create and use a user named `ubuntu`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue