Skip to content

Commit

Permalink
docs(setup + readme): improved database setup guide and added title t…
Browse files Browse the repository at this point in the history
…o readme (#43)
  • Loading branch information
NishantJoshi00 authored Nov 13, 2023
1 parent 2d9a5ff commit 0e311a7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Tartarus - Rust Locker


## Overview

The Hyperswitch Card Vault (Tartarus) is a highly performant and a secure vault to save sensitive data such as payment card details, bank account details etc.
Expand Down
26 changes: 26 additions & 0 deletions docs/guides/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,32 @@ The configuration can be provided in two ways

- Local Setup:

User setup before running the diesel commands,

```bash
export DB_USER="db_user"
export DB_PASS="db_pass"
export DB_NAME="locker"
```

On Ubuntu-based systems (also applicable for Ubuntu on WSL2):

```bash
sudo -u postgres psql -e -c \
"CREATE USER $DB_USER WITH PASSWORD '$DB_PASS' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;"
sudo -u postgres psql -e -c \
"CREATE DATABASE $DB_NAME;"
```

On MacOS:

```bash
psql -e -U postgres -c \
"CREATE USER $DB_USER WITH PASSWORD '$DB_PASS' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;"
psql -e -U postgres -c \
"CREATE DATABASE $DB_NAME"
```

For local setup, you can use the diesel-cli to run the diesel migrations.
To install the diesel cli, simply run

Expand Down

0 comments on commit 0e311a7

Please sign in to comment.