-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: improv repo setup documentation
- Loading branch information
Showing
6 changed files
with
48 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,30 +12,15 @@ You will need to install docker (check official docker documentation) and postgr | |
brew install postgres | ||
``` | ||
|
||
### 2. Define local env vars | ||
|
||
Inside the `/packages/db` folder create a file called `.env.local` with the following content. | ||
|
||
```ini | ||
# PostgREST API URL | ||
PG_REST_URL=http://localhost:3000 | ||
# PostgREST API token, for role "postgres", using secret value PGRST_JWT_SECRET from './postgres/docker/docker-compose.yml' | ||
# https://postgrest.org/en/v8.0/tutorials/tut1.html#step-3-sign-a-token | ||
PG_REST_JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoicG9zdGdyZXMifQ.oM0SXF31Vs1nfwCaDxjlczE237KcNKhTpKEYxMX-jEU | ||
|
||
# Connection string for locally running postgres used in tests | ||
PG_CONNECTION=postgres://postgres:[email protected]:5432/postgres | ||
``` | ||
|
||
Production vars are set in Github Actions secrets. | ||
## Getting started | ||
|
||
### 3. Ready to go | ||
Please follow the instructions in the main monorepo [Readme](../../README.md). | ||
|
||
You can now start your development and run DB tests. The test setup has hooks to start your local docker containers and stop/clean them in the end. | ||
|
||
## Local DB Setup | ||
|
||
If you want to run your own local DB for development using this package DB client, you can easily do it as follows: | ||
If you want to run your own local DB in isolation using this package DB client, you can easily do it as follows: | ||
|
||
|
||
### 1. Start Database and postgrest | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,4 +37,4 @@ | |
"sade": "^1.7.4", | ||
"standard": "^16.0.3" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters