Skip to content

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 through next.config.ts rewrites.
  • The frontend reads posts and destinations directly from the CMS using NEXT_PUBLIC_POST_URL.
  • The CMS calls the frontend's /api/revalidate after 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 ​

ProjectBuildStart
api.myeasyguide.compnpm build (Prisma generate + tsc + alias rewrite)pnpm start (dist/server.js, PORT default 3000)
cms.myeasyguide.compnpm build (Next.js)pnpm start (Next.js, default port 3000)
myeasyguide.compnpm 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:

bash
git pull
pnpm install --frozen-lockfile
pnpm build
pm2 restart <process-name>   # or restart however the process is supervised

Before restarting the API, apply database changes deliberately:

bash
pnpm prisma migrate deploy

Do 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:

  1. API — ship backward-compatible endpoints first.
  2. CMS — if it depends on new API behavior.
  3. 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 ​

AppCheck
APIGET /api/v1/health returns OK
CMS/api/posts/public returns a JSON list
FrontendHome 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:

bash
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).

Built with VitePress