This project is built with NextJS and Prisma, so all you need is NodeJS server with any database that Prisma supports.
For further info check NextJS and Prisma deployment guides.
node scripts/generate-secrets
It will generate secrets in dotenv format.
NCD_SECRET='E2OAhG1AdQP4Rq1II0h0eRNiygdbfMQj7DNIOM3VoUc='
SESSION_SECRET='nBoPA6LvhkK4ZuWIlko04Id5yZQux+UvGw2H+5RNYsY='
node scripts/generate-secrets >> .env
You can use any name you want for the secrets, but you have to keep same env variable names.
# Generate new secrets for preview
node scripts/generate-secrets > .env.preview
# Copy all the new variables for the preview
source .env.preview
vercel secret rm ncd-secret-prev --yes
vercel secrets add ncd-secret-prev "${NCD_SECRET}"
vercel env rm NCD_SECRET preview --yes
printf "ncd-secret-prev" | vercel env add secret NCD_SECRET preview
vercel secret rm ncd-session-secret-prev --yes
vercel secrets add ncd-session-secret-prev "${SESSION_SECRET}"
vercel env rm SESSION_SECRET preview --yes
printf "ncd-session-secret-prev" | vercel env add secret SESSION_SECRET preview
# Generate new secrets for production
node scripts/generate-secrets > .env.production
# Copy all the new variables for the production
source .env.production
vercel secret rm ncd-secret-prod --yes
vercel secrets add ncd-secret-prod "${NCD_SECRET}"
vercel env rm NCD_SECRET production --yes
printf "ncd-secret-prod" | vercel env add secret NCD_SECRET production
vercel secret rm ncd-secret-prev --yes
vercel secrets add ncd-secret-prev "${SESSION_SECRET}"
vercel env rm SESSION_SECRET production --yes
printf "ncd-secret-prev" | vercel env add secret SESSION_SECRET production
You can use any CI, but you have to reconfigure Cypress agent to use Next Cypress Dashboard first. You can check Sorry Cypress documentation for that.
strategy:
fail-fast: false
matrix:
container: [A, B, C, D, E, F]
steps:
- uses: actions/checkout@v1
- run: npm ci
- uses: umidbekk/next-cypress-dashboard/actions/patch-cypress-config@main
with:
api_url: ${{ secrets.NEXT_CYPRESS_DASHBOARD_URL }}
- run: npx cypress run --record --parallel --ci-build-id=e2e-${{ github.sha }}
- if: failure()
uses: actions/upload-artifact@v2
with:
name: cypress-${{ matrix.container }}
path: cypress/videos
Please check schema.prisma file for more detail.
Please check pages/api/[...api].api.ts file for more detail.