Local Postgresql & pgAdmin with Docker
A useful quick snippet for local Postgresql & pgAdmin with Docker.
Create a docker-compose.yml file
docker-compose.yml
Default credentials:
main@main.com / password
pgAdmin local link:
http://localhost:5050
In NextJs create .env and add the connection string
.env
For SQLite, in schema.prisma change:
schema.prisma
Initializing PrismaClient
/prisma/db.ts
Basic Prisma schema model
/prisma/schema.prisma