Operations
Runbook 03 — Deployment (Coolify) and the web pipeline
How
apps/webis built and deployed, and all the real decisions/gotchas. Update this document whenever the pipeline changes.
Deployment architecture
push to Forgejo (git.soconnective.com/feedback/soconnective, main branch)
│
▼
Coolify (panel.soconnective.com) clones the repo ──► build with Nixpacks (Next.js)
│ │
▼ ▼
Docker container ◄── Traefik (Coolify proxy, HTTPS Let's Encrypt) ── new.soconnective.com
Everything runs on the Vidot VPS (216.250.119.216).
The "web" application in Coolify
| Parameter | Value |
|---|---|
| App uuid | aq2yufox3d0t0bbsramqct80 |
| Project / environment | My first project / production |
| Server | localhost (uuid ponvozky9ykhikb3ph05qnwx) |
| Repo (clone) | https://feedback:<READ_TOKEN>@git.soconnective.com/feedback/soconnective.git |
| Branch | main |
| Build pack | nixpacks (auto-detects Next.js) |
| base_directory | /apps/web (monorepo: only builds the web app) |
| Exposed port | 3000 (Next.js) |
| install_command | npm install --no-audit --no-fund (see Gotcha #1) |
| Domain | https://new.soconnective.com (automatic HTTPS) |
The Forgejo read token is stored in
fs-secrets/forgejo-deploy-token.txt(never in git). Coolify masks the token in its logs.
How to deploy (manual, via API)
For now, deployment is triggered manually (auto-deploy pending). From the server (or via an SSH tunnel), using the Coolify API token:
curl -s -H "Authorization: Bearer <API_TOKEN_COOLIFY>" \
"http://localhost:8000/api/v1/deploy?uuid=aq2yufox3d0t0bbsramqct80&force=true"
Check a deployment's status/logs:
curl -s -H "Authorization: Bearer <API_TOKEN>" \
http://localhost:8000/api/v1/deployments/<DEPLOY_UUID> | jq -r '.status, (.logs|fromjson?|.[].output)'
The Coolify API token is in
fs-secrets/coolify-api-token.txt. It can be revoked in Coolify → Settings → Keys & Tokens when not in use.
Gotchas (real problems and their solutions)
npm ciwas failing (Missing: @swc/helpers from lock file). Cause: the lockfile was generated with npm 11 / node 24 (local) and the Nixpacks build uses npm 10 / node 22 →npm ci(strict) rejects it. Solution:install_command = npm install(tolerant). (Future improvement: pin the Node version in Nixpacks to match dev and build.)Coolify "public repo" was mangling the URL to SSH and the clone was failing. Solution: an HTTPS clone with a token is used in
git_repository(field in the DB), without an SSH deploy key.The active demo is chosen in
apps/web/app/page.tsx(re-exports the demo fromapp/(homes)/index-creative-agency). Change it there to use another demo.
Indexing status
⚠️ The site is on noindex + robots.txt: Disallow / (staging). Before publishing: remove robots.index=false in app/layout.tsx and adjust app/robots.ts.