$ docker-compose up -d
$ cp .env.example .env
$ vim .env
$ npm install
$ npx prisma migrate dev
$ npx prisma db seed
$ npm run dev
This project is deployed on Vercel and uses Neon as the managed PostgreSQL database. Follow these steps to deploy your application to production:
-
Set up the database on Neon:
- Create a new PostgreSQL database on Neon.
- Note down the connection details provided by Neon.
-
Set up environment variables on Vercel:
- Go to your project settings on Vercel.
- Add the required environment variables, including the database connection details from Neon, under the "Environment Variables" section.
-
Deploy your application:
- Push your code to the main branch of your repository.
- Vercel will automatically detect the push and start the deployment process.
-
Access your application:
- Once the deployment is complete, you can access your application at the provided URL.
Database migrations and seeding are automatically handled during the build process. Ensure that the build command in your package.json
includes the necessary scripts:
"scripts": {
"build": "prisma migrate deploy && prisma db seed && next build"
}