Skip to content

Deployment runbook

Two main deploys. No CI/CD — everything is manual SSH/rsync.

Backend → api.twinlix.com

bash
ssh root@144.76.159.73   # Hetzner
cd /opt/dm-voice-agent-twinlix
git pull origin main
cd backend
npm install
npx prisma migrate deploy
npx prisma generate    # mandatory if schema.prisma changed
npm run build
pm2 restart dm-voice-agent

The backend builds to dist/; PM2 runs the compiled JS. Always run npx prisma generate after any schema change — npm install doesn't do it for you, and npm run build swallows the error (tsc || true), so dist/ keeps the old JS and pm2 restarts the same broken code.

Frontend → app.twinlix.com

From the workstation:

bash
cd twinlix-admin-front
make deploy-prod

The Makefile runs npm run build and rsyncs dist/ to /var/www/app.twinlix.com/ on the Hetzner box. No CI/CDgit push origin main to git.axisway.com doesn't trigger a deploy.

Other deploys

  • dma-crm → crm.twinlix.com: cd dma-crm && ./deploy-twinlix.sh.
  • twinlix-admin → admin.twinlix.com: cd twinlix-admin && make deploy-prod.
  • docs.twinlix.com (this site): rsync twinlix-docs/.vitepress/dist to the landing-site server. See twinlix-docs/README.md.

Stripe live key swap

Documented in TWIN-135. Short version: replace STRIPE_* env vars on the backend, register a webhook endpoint via the Stripe API, mirror the price IDs onto pricing_tiers, and wipe stale stripe_customer_id values from any test-mode subscriptions.

Twinlix platform documentation.