How we built Tradevo's deploy flow
Two years ago we deployed a client site like this: open laptop, ssh, git pull, pnpm install, pnpm build, pm2 restart, sometimes a manual nginx reload, fingers crossed. About half an afternoon per site. With twenty sites that became uneconomical.
Tradevo.nl is our internal solution: no Kubernetes, no Docker Swarm, no fancy orchestrator. Instead a flat set of TypeScript scripts, a JSON port registry, systemd templates and a thin web dashboard. Every part exists because we ran into it.
The port registry is the heart. Each client site gets one port between 3000 and 3099. No more collisions. A Node script reads the registry, generates a systemd service file per client and a matching nginx vhost. Deploy = tar + scp + extract + install + build + systemctl restart. Five minutes.
The trickiest puzzle was Let's Encrypt automation. Certificates that expire without warning are the most banal failure scenario on a VPS. We wrote a cron job that renews 7 days before expiry, falls over to a webroot challenge if DNS-01 doesn't work and sends a Slack webhook on unexpected exit codes.
A bonus: Cloudflare's API. We automate the A-record creation for new clients, set it to grey-cloud initially for cert issuance and flip it to orange-cloud after validation. That saves five minutes per site and prevents a classic Let's Encrypt vs Cloudflare proxy mistake that's easy to make.
Open-sourcing Tradevo is under discussion. The current codebase is tightly coupled to our VPS setup (Ubuntu 24 + nginx + systemd), but an abstracted variant looks usable for studios with 10-30 client sites. If you're interested: [email protected].
/ Deel dit /
