Skip to content

Deployment

There is no CI/CD pipeline for this repository. Every build and deploy step below is run by hand, by a human operator, on the target Windows server.

First-time server setup

Run once, when the server is first provisioned.

powershell
git clone git@gitlab.com:devlogicton/logicton-docs.git C:\apps\logicton-docs
Set-Location C:\apps\logicton-docs
corepack enable
pnpm install --frozen-lockfile
pnpm run docs:build
Copy-Item cms\.env.example cms\.env
pnpm --filter logicton-cms run build
pm2 start ecosystem.config.cjs
pm2 save

Environment variables

Set these in cms/.env before the first start.

VariableExampleNotes
PAYLOAD_SECRETa long random stringNever commit this value
DATABASE_URLfile:./data/payload.dbSQLite file, relative to cms/
PORT4000Port the Node process listens on

TIP

After the first pm2 start, visit /admin once. Payload shows a first-user creation screen automatically when the Users collection is empty.

Routine updates

Content-only change (no restart needed)

powershell
git pull origin main
pnpm install --frozen-lockfile
pnpm run docs:build

Change touching cms/ code

powershell
git pull origin main
pnpm install --frozen-lockfile
pnpm --filter logicton-cms run build
pm2 restart logicton-docs-cms
pm2 save

WARNING

Skipping pm2 restart after a cms/ code change leaves the old build running — Next.js does not hot-reload a production next start process.

Checking the running process

bash
pm2 status
pm2 logs logicton-docs-cms

See the system overview for what this process actually does.