mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
docs: update postgres docs with sample configuration
This commit is contained in:
parent
35b11ef791
commit
7c9bd93196
@ -6,10 +6,12 @@ describes how it can be configured.
|
||||
|
||||
## Building LND with postgres support
|
||||
|
||||
To build LND with postgres support, include the following build tag:
|
||||
Since `lnd v0.14.1-beta` the necessary build tags to enable postgres support are
|
||||
already enabled by default. The default release binaries or docker images can
|
||||
be used. To build from source, simply run:
|
||||
|
||||
```shell
|
||||
⛰ make tags="kvdb_postgres"
|
||||
⛰ make install
|
||||
```
|
||||
|
||||
## Configuring Postgres for LND
|
||||
@ -29,3 +31,13 @@ LND is configured for Postgres through the following configuration options:
|
||||
database, user and password.
|
||||
* `db.postgres.timeout=...` to set the connection timeout. If not set, no
|
||||
timeout applies.
|
||||
|
||||
Example as follows:
|
||||
```
|
||||
[db]
|
||||
db.backend=postgres
|
||||
db.postgres.dsn=postgresql://dbuser:dbpass@127.0.0.1:5432/dbname
|
||||
db.postgres.timeout=0
|
||||
```
|
||||
Connection timeout is disabled, to account for situations where the database
|
||||
might be slow for unexpected reasons.
|
||||
|
Loading…
Reference in New Issue
Block a user