Skip to content

Commit ffa260d

Browse files
committed
documented postgresql as wallet storage
Signed-off-by: Christian <[email protected]>
1 parent 04a42b2 commit ffa260d

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

Databases.md

+37-1
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,52 @@
22

33
Your wallet stores secret keys, connections and other information.
44
You have different choices to store this information.
5-
The wallet supports 2 different databases to store data, SQLite and PostgresDB.
5+
The wallet supports 2 different databases to store data, SQLite and PostgreSQL.
66

77
## SQLite
88

99
If the wallet is configured the default way in eg. [demo-args.yaml](demo/demo-args.yaml), without explicit wallet-storage, a sqlite database file is used.
1010

1111
```yaml
12+
# demo-args.yaml
1213
wallet-type: indy
1314
wallet-name: wallet
1415
wallet-key: wallet-password
1516
```
1617
1718
For this configuration, a folder called wallet will be created which contains a file called `sqlite.db`.
19+
20+
## PostgreSQL
21+
22+
The wallet can be configured to use PostgreSQL as storage.
23+
24+
```yaml
25+
# demo-args.yaml
26+
wallet-type: indy
27+
wallet-name: wallet
28+
wallet-key: wallet-password
29+
30+
wallet-storage-type: postgres_storage
31+
wallet-storage-config: "{\"url\":\"db:5432\",\"wallet_scheme\":\"DatabasePerWallet\"}"
32+
wallet-storage-creds: "{\"account\":\"postgres\",\"password\":\"mysecretpassword\",\"admin_account\":\"postgres\",\"admin_password\":\"mysecretpassword\"}"
33+
```
34+
35+
In this case the hostname for the database is `db` on port 5432.
36+
37+
A docker-compose file could look like this:
38+
39+
```yaml
40+
# docker-compose.yml
41+
version: '3'
42+
services:
43+
# acapy ...
44+
# database
45+
db:
46+
image: postgres:10
47+
environment:
48+
POSTGRES_PASSWORD: mysecretpassword
49+
POSTGRES_USER: postgres
50+
POSTGRES_DB: postgres
51+
ports:
52+
- "5432:5432"
53+
```

0 commit comments

Comments
 (0)