From 04a42b2b9aba6fcb78f47b0283b4fbbda9fee68e Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 29 Nov 2021 10:45:00 +0100 Subject: [PATCH 1/3] added documentation for sqlite database as wallet storage Signed-off-by: Christian --- Databases.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Databases.md diff --git a/Databases.md b/Databases.md new file mode 100644 index 0000000000..e195ee41a6 --- /dev/null +++ b/Databases.md @@ -0,0 +1,17 @@ +# 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 PostgresDB. + +## 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 +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`. From ffa260db163e124374f617b34b8b00a63e49e723 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 29 Nov 2021 10:57:29 +0100 Subject: [PATCH 2/3] documented postgresql as wallet storage Signed-off-by: Christian --- Databases.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/Databases.md b/Databases.md index e195ee41a6..426e879140 100644 --- a/Databases.md +++ b/Databases.md @@ -2,16 +2,52 @@ 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 PostgresDB. +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" +``` From 5d2e8501d0398fed8942147e9dc9522207a000b1 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 29 Nov 2021 13:21:10 +0100 Subject: [PATCH 3/3] linked wallet databases in dev readme Signed-off-by: Christian --- DevReadMe.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DevReadMe.md b/DevReadMe.md index 7f46c6421b..c40a31189f 100644 --- a/DevReadMe.md +++ b/DevReadMe.md @@ -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.