Skip to content

Commit 4f45794

Browse files
authored
Update Postgres database documentation
Reorganize Postgres database section and add credentials information.
1 parent e3526a6 commit 4f45794

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

packages/docs/Node/index.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,9 @@ npm run up
5353
The node will create the docker volumes in the `packages/node/chain-setup/**` directory of the selected chain and network. This folder contains the blockchain data and the database. The postgres database is used to efficiently store the complete blockchain data, for fast access and indexing.
5454
!!!
5555

56-
### Postgres Database
57-
58-
The node uses a Postgres database to store the synced information required by the Bitcoin Computer protocol. The database is automatically created and managed by the node using a docker container. The full db schema can be found [here](https://github.com/bitcoin-computer/monorepo/blob/main/packages/node/db/db_schema.sql).
56+
#### IMPORTANT: Create indexes after syncing to mainnet
5957

60-
### Create indexes after syncing to mainnet
61-
62-
To reduce db syncing overhead, the sync process is carried out without creating db indexes. After the node has synced, you can create the indexes with the command below.
58+
To speed up the syncing process, syncing is carried out without db indexes. After the node has synced, you can create the indexes with the command below.
6359

6460
<font size=1>
6561

@@ -70,6 +66,22 @@ npm run create-indexes
7066

7167
</font>
7268

69+
### Postgres Database
70+
71+
The node uses a Postgres database to store the synced information required by the Bitcoin Computer protocol. The database is automatically created and managed by the node using a docker container. The full db schema can be found [here](https://github.com/bitcoin-computer/monorepo/blob/main/packages/node/db/db_schema.sql).
72+
73+
By default the database uses the following credentials:
74+
75+
```shell
76+
POSTGRES_USER='bcn'
77+
POSTGRES_PASSWORD='bcn'
78+
POSTGRES_DB='bcn'
79+
POSTGRES_HOST='db'
80+
POSTGRES_PORT='5432'
81+
```
82+
83+
You can configure these from the `.env` file for production deployments.
84+
7385
### Run the Tests
7486

7587
You can run the integration tests with the command below.

0 commit comments

Comments
 (0)