Deployment Overview
Topology
The three apps are deployed independently and talk over HTTPS:
┌──────────────────────────────┐
travellers ─────▶│ myeasyguide.com (Next.js 15) │
└───────┬──────────────┬───────┘
│ │
/api/v1 proxy │ │ direct content reads
▼ ▼
┌──────────────┐ ┌────────────────────────┐
│ api. │ │ cms. │
│ myeasyguide │ │ myeasyguide │
│ Express 5 │ │ Next.js 16 │
└──────┬───────┘ └───────────┬────────────┘
│ │
▼ ▼
myeasyguide_prod cms_myeasyguide
(PostgreSQL) (PostgreSQL)- The frontend proxies
/api/v1/*to the Express API throughnext.config.tsrewrites. - The frontend reads posts and destinations directly from the CMS using
NEXT_PUBLIC_POST_URL. - The CMS calls the frontend's
/api/revalidateafter publishing. - The API and CMS use separate databases and credentials.
There is no Docker or container orchestration. Each app is a long-running Node process behind a reverse proxy (nginx or the hosting platform's equivalent). PostgreSQL can be local or managed; the only contract is DATABASE_URL.
What is in the repositories
| Project | Build | Start |
|---|---|---|
api.myeasyguide.com | pnpm build (Prisma generate + tsc + alias rewrite) | pnpm start (dist/server.js, PORT default 3000) |
cms.myeasyguide.com | pnpm build (Next.js) | pnpm start (Next.js, default port 3000) |
myeasyguide.com | pnpm build (Next.js + postbuild sitemaps) | pnpm start (next start -p $PORT) |
None of the three repositories contains a CI/CD workflow, Dockerfile, or PM2 ecosystem file. Deployment is manual: build, restart the process, verify.
Standard release
Run the same sequence in each repository you are deploying:
git pull
pnpm install --frozen-lockfile
pnpm build
pm2 restart <process-name> # or restart however the process is supervisedBefore restarting the API, apply database changes deliberately:
pnpm prisma migrate deployDo not run prisma migrate dev on a production database. If a migration is destructive, take a backup and confirm with the team first.
Release order
When a change spans apps, deploy in this order:
- API — ship backward-compatible endpoints first.
- CMS — if it depends on new API behavior.
- Frontend — last, because it consumes both.
For content-only changes, only the CMS needs a restart. The frontend refreshes affected pages through revalidation.
Frontend build-time values
NEXT_PUBLIC_* variables are baked into the bundle. They must be set in the environment that runs pnpm build, not only at runtime. Changing one requires a rebuild.
Health checks after deploy
| App | Check |
|---|---|
| API | GET /api/v1/health returns OK |
| CMS | /api/posts/public returns a JSON list |
| Frontend | Home page renders, an activity page loads, /api/revalidate rejects requests without the secret |
Rollback
There is no automated rollback. Keep the previous release checkout or build artifact, then:
git checkout <previous-commit>
pnpm install --frozen-lockfile
pnpm build
pm2 restart <process-name>Database migrations are not rolled back automatically. Write migrations so the previous app version can still run against the new schema (expand, then contract in a later release).