Skip to content

Commit

Permalink
Add DB seeding detail
Browse files Browse the repository at this point in the history
  • Loading branch information
zelus_pudding committed Nov 11, 2024
1 parent 9883ed0 commit 793d03a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ A highly performant e-commerce template using Next.js and AI generated content b
### Local dev

- Run `vc env pull` to get a `.env.local` file with your db credentials.
- Run `pnpm install` && `pnpm dev` to start developing
- Run `pnpm install` && `pnpm dev` to start developing.
- The data/data.zip includes a ~300 MB data.sql file with the full schema and 1,000,000+ products (*Note, the data exceeds the size limit allowed by the free tier for Neon on Vercel* [see more](https://vercel.com/docs/storage/vercel-postgres/usage-and-pricing#pricing)). To seed Vercel Postgres with this data:
- Unzip data.zip to data.sql.
- Run `psql "YOUR_CONNECTION_STRING" -f data.sql`.
- For DB migrations with `drizzle-kit`:
- Make sure `?sslmode=required` is added to the `POSTGRES_URL` env for dev
- Run `pnpm db:push` to apply schema to your db
- The data/data.zip includes a ~300 MB data.sql file with the full schema and 1,000,000+ products
- *NOTE: The data exceeds the size limit allowed by the free tier for Neon on Vercel* [see more](https://vercel.com/docs/storage/vercel-postgres/usage-and-pricing#pricing)

### Performance

Expand Down

0 comments on commit 793d03a

Please sign in to comment.