-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Instant Project Online (#1494)
* Instant Fork & Run * Instant Fork & Run * fix readme typo * Update .env.example * Update README.md * Update README.md --------- Co-authored-by: adiiittt <[email protected]> Co-authored-by: Sargam <[email protected]>
- Loading branch information
1 parent
d2cb0f3
commit fc637b5
Showing
3 changed files
with
56 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copies .env.example and changes it to .env so that future commands can find the env file | ||
cp .env.example .env | ||
|
||
|
||
# Start PostgreSQL container | ||
docker run -d \ | ||
--name cms-db \ | ||
-e POSTGRES_USER=myuser \ | ||
-e POSTGRES_PASSWORD=mypassword \ | ||
-e POSTGRES_DB=mydatabase \ | ||
-p 5432:5432 \ | ||
postgres | ||
|
||
# Wait for the PostgreSQL container to be ready | ||
echo "Waiting for PostgreSQL to be ready..." | ||
sleep 10 | ||
|
||
# Install dependencies | ||
pnpm install | ||
|
||
# Run Prisma migrations | ||
pnpm run prisma:migrate | ||
|
||
# Generate Prisma client | ||
pnpm prisma generate | ||
|
||
# Seed the database | ||
pnpm run db:seed | ||
|
||
# Start the development server | ||
pnpm run dev |