Skip to content

Commit

Permalink
fix: fix password substitution in start-database scripts (t3-oss#1764)
Browse files Browse the repository at this point in the history
Co-authored-by: Christopher Ehrlich <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>
  • Loading branch information
3 people committed Feb 22, 2024
1 parent c944c49 commit 79e361c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/loud-pugs-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-t3-app": patch
---

fix: fix password substitution in start-database scripts
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 @@ -36,7 +36,7 @@ if [ "$DB_PASSWORD" == "password" ]; then
exit 1
fi
DB_PASSWORD=$(openssl rand -base64 12)
sed -i -e "s/:password@/:$DB_PASSWORD@/" .env
sed -i -e "s#:password@#:$DB_PASSWORD@#" .env
fi

docker run --name $DB_CONTAINER_NAME -e MYSQL_ROOT_PASSWORD=$DB_PASSWORD -e MYSQL_DATABASE=project1 -d -p 3306:3306 docker.io/mysql
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 @@ -36,7 +36,7 @@ if [ "$DB_PASSWORD" = "password" ]; then
exit 1
fi
DB_PASSWORD=$(openssl rand -base64 12)
sed -i -e "s/:password@/:$DB_PASSWORD@/" .env
sed -i -e "s#:password@#:$DB_PASSWORD@#" .env
fi

docker run --name $DB_CONTAINER_NAME -e POSTGRES_PASSWORD=$DB_PASSWORD -e POSTGRES_DB=project1 -d -p 5432:5432 docker.io/postgres
Expand Down

0 comments on commit 79e361c

Please sign in to comment.