Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added documentation for wallet storage databases #1523

Merged
merged 6 commits into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions Databases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Databases

Your wallet stores secret keys, connections and other information.
You have different choices to store this information.
The wallet supports 2 different databases to store data, SQLite and PostgreSQL.

## SQLite

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.

```yaml
# demo-args.yaml
wallet-type: indy
wallet-name: wallet
wallet-key: wallet-password
```

For this configuration, a folder called wallet will be created which contains a file called `sqlite.db`.

## PostgreSQL

The wallet can be configured to use PostgreSQL as storage.

```yaml
# demo-args.yaml
wallet-type: indy
wallet-name: wallet
wallet-key: wallet-password

wallet-storage-type: postgres_storage
wallet-storage-config: "{\"url\":\"db:5432\",\"wallet_scheme\":\"DatabasePerWallet\"}"
wallet-storage-creds: "{\"account\":\"postgres\",\"password\":\"mysecretpassword\",\"admin_account\":\"postgres\",\"admin_password\":\"mysecretpassword\"}"
```

In this case the hostname for the database is `db` on port 5432.

A docker-compose file could look like this:

```yaml
# docker-compose.yml
version: '3'
services:
# acapy ...
# database
db:
image: postgres:10
environment:
POSTGRES_PASSWORD: mysecretpassword
POSTGRES_USER: postgres
POSTGRES_DB: postgres
ports:
- "5432:5432"
```
2 changes: 2 additions & 0 deletions DevReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ aca-py provision --wallet-type indy --seed $SEED

For additional `provision` options, execute `aca-py provision --help`.

Additional information about wallet storages can be found [here](Databases.md).

### Mediation

ACA-Py can also run in mediator mode - ACA-Py can be run *as* a mediator (it can mediate connections for other agents), or it can connect to an external mediator to mediate its own connections. See the [docs on mediation](Mediation.md) for more info.
Expand Down