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

fix: prevent start-database.sh from creating .env-e, fixes #2060 #2061

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions .changeset/sour-pots-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-t3-app": patch
---

fix start-database.sh to not create an `.env-e` file, which is not gitignored, thus preventing exposure of auth secret, fixes #2060
2 changes: 1 addition & 1 deletion .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: PR Checks
on:
pull_request_target:
branches: ["*"]
types: ["opened", "synchronize"]
types: ["opened", "edited", "synchronize"]

jobs:
lint-pr-title:
Expand Down
2 changes: 1 addition & 1 deletion cli/template/extras/start-database/mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [ "$DB_PASSWORD" == "password" ]; then
fi
# Generate a random URL-safe password
DB_PASSWORD=$(openssl rand -base64 12 | tr '+/' '-_')
sed -i -e "s#:password@#:$DB_PASSWORD@#" .env
sed -i '' "s#:password@#:$DB_PASSWORD@#" .env
fi

docker run -d \
Expand Down
2 changes: 1 addition & 1 deletion cli/template/extras/start-database/postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if [ "$DB_PASSWORD" = "password" ]; then
fi
# Generate a random URL-safe password
DB_PASSWORD=$(openssl rand -base64 12 | tr '+/' '-_')
sed -i -e "s#:password@#:$DB_PASSWORD@#" .env
sed -i '' "s#:password@#:$DB_PASSWORD@#" .env
fi

docker run -d \
Expand Down
Loading