CI/CD pipeline
The repo does not have a full automated CI/CD pipeline today. Deployments are still manual.
This page describes the flow the repo actually uses now.
Current workflow
- Build the image with Docker Compose.
- Run Prisma generation inside the image build.
- Build the Next.js app in standalone mode.
- Start the app and Redis containers with Docker Compose.
Build flow
Dockerfile.prod has four jobs:
base: enablespnpminstaller: installs full dependencies for the buildprod-installer: installs production dependencies for the runtime imagebuilder: runspnpm exec prisma generateandpnpm run buildrunner: copies the standalone app output and startsnode server.js
Important detail: the production Docker build no longer builds a separate docs site.
Staging commands
Direct compose equivalents:
docker compose -f docker-compose.staging.yml build --no-cache
docker compose -f docker-compose.staging.yml up -d
docker compose -f docker-compose.staging.yml down
Production commands
Direct compose equivalents:
docker compose -f docker-compose.prod.yml build --no-cache
docker compose -f docker-compose.prod.yml up -d
docker compose -f docker-compose.prod.yml down
docker compose -f docker-compose.prod.yml logs -f
Release checklist
Before production deploy:
- Run
pnpm lint - Run
pnpm test - Run
pnpm build - Confirm the right
.env.productionvalues are in place - Back up the production database if the release is risky
- Run
pnpm db:deploy-prodwhen schema changes are included
Rollback
If a deploy goes wrong:
- Stop the current production containers.
- Restore the previous image or previous checkout.
- Start production again.
- If the release included a bad migration, restore the database from backup.
Useful commands:
What is not in place yet
These pieces are not wired up in the repo today:
- automatic deploys on push
- container registry publishing
- approval gates
- automated rollback
- end-to-end deployment automation
If those are added later, update this page to describe the real pipeline rather than a proposed one.