DeployBox — push-to-deploy in a weekend, explained

Problem

Deploying a side project shouldn't require a Kubernetes tutorial. Heroku is gone for hobby projects, and the remaining options either cost per-seat or hide the build. I wanted git push → live URL, with the logs visible while it happens.

What I built

A self-hosted PaaS:

  1. GitHub webhook (or OAuth repo connect) hits the Next.js API
  2. A deployment row is created and pushed to Redis (deploy:queue)
  3. A .NET worker pops the job and runs the pipeline: git clone → docker build from the repo's Dockerfile → docker run → generate an Nginx vhost for <subdomain>.<domain> → reload
  4. Every step publishes to logs:<id>; the browser subscribes over SSE and renders the build log live

The decisions that mattered

Queue, not request handler

Builds take minutes. Doing them inside the HTTP request means a dropped connection kills a deployment. Redis as both queue and pub/sub keeps the worker stateless and restartable.

Logs over SSE, not WebSocket

One-way streaming with automatic reconnect and no extra protocol to maintain — the client is an EventSource and a <pre>.

Nginx as the routing layer

Instead of an in-app proxy, each deployment gets a generated vhost. Routing stays fast, TLS is centralized, and the app never handles customer traffic.

Result

Push a repo, watch the build stream, get a URL. Multi-project, per-deployment logs, retry and teardown included.

What it proves

I understand the boring parts that make deploys work — process isolation, idempotent builds, log durability, reverse-proxy config — and I can build them from scratch.