- Install nodejs
- Clone the repo
- Install dependencies
npm install - Start DB locally
docker run -it --rm --name postgres -d -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 postgres- (OR) Go to Neon.tech and get yourself a connection string
- Update the DATABASE_URL in your .env file
- Run
npm prisma migrate dev - npm build
- npm start
- Install docker
- Create docker network
docker network create db - Start postgres
docker run -it --rm --name postgres -d --network db -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 postgres
- Build image -
docker build --network=host -t <image-name> . - Run the image -
docker run -p 3000:3000 --network db -e DATABASE_URL=postgresql://postgres:mysecretpassword@postgres:5432/postgres <image-name>
- Install docker compose
- Run
docker compose up