-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: ♻️ developer experience #145
base: main
Are you sure you want to change the base?
Conversation
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
11027252 | Triggered | Generic Password | 1c761d0 | docker-compose.yml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
This is a false alarm. The |
@@ -8,7 +8,7 @@ | |||
"main": "index.ts", | |||
"types": "index.ts", | |||
"scripts": { | |||
"db:push": "prisma db push", | |||
"db:push": "dotenv -e ../../.env prisma db push", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open issue with prisma and monorepo tech: prisma/prisma#12535
TLDR: they still haven't really optimized the combination.
DATABASE_PASSWORD=postgres | ||
DATABASE_DATABASE=anteaterapi | ||
DATABASE_PORT=5432 | ||
DATABASE_URL=${DATABASE_DIALECT}://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DATABASE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on the program that's used to parse the .env
file, it may or may not support variable substitution. TIL, prisma does in fact support it, which is convenient for integrating this with docker-compose. The logic being that docker-compose.yml
will automatically parse the nearest .env
file (also with variable substitution enabled), and thus share the identical database configuration.
@@ -18,6 +18,7 @@ yarn-error.log* | |||
|
|||
# env | |||
.env* | |||
!.env.example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Special case.
libs/db/db.sql.gz
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
38 MB doesn't seem too bad? 👀
It's extremely simple to setup the local db instance with this format!
@@ -1,6 +1,9 @@ | |||
{ | |||
"$schema": "https://turbo.build/schema.json", | |||
"pipeline": { | |||
"db:push": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the root package.json can run pnpm db:push
.
Features
docker compose
Simple docker-compose setup for getting started.
Project
Closes #150