Skip to content

DaliGabriel/NextjsPostgresqlDockerCompose

Repository files navigation

Special thanks to 99lalo Github profile for give me the first boilerplate and the dockers file to make it possible

If you want to run the app in development mode, you can run npm run docker:compose:dev.

For running on production mode you can run npm run docker:compose:prod, but know that you won't have hot reloading.

You also need to create your .env and .dockerignore files.


This is a Next.js project bootstrapped with create-next-app.

Getting Started

Git clone:

git clone https://github.com/DaliGabriel/NextjsPostgresqlDockerCompose.git

Access the folder:

cd NextjsPostgresqlDockerCompose/

Install node packages:

npm i

Install node packages:

npm run docker:compose:dev

Docker nextjs prisma init

Init the migrations previously defined on Prisma/schema.prisma:

docker exec -it <ContainesId> npx prisma migrate dev --name init

Run the seeders(optional):

docker exec -it <ContainesId> npx prisma db seed

Run prisma studio(optional):

docker exec -it <ContainesId> npx prisma studio

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

NextjsPostgresqlDockerCompose

NextjsPostgresqlDockerCompose

About

Simple template to use nextjs. postgresql and prisma with docker compose to an easy deployment on any vps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors