ShipDeck is a self-hosted developer platform (like a private, lightweight Heroku or Render) built from scratch using TypeScript and Java. It automates code compilation, container management, web traffic routing, and server health tracking on a single machine.
Usually, putting a website online is a chore: you have to buy a server, configure database links, set up security certificates, configure route mappings (like Nginx), and manually copy files over every time you make an update.
ShipDeck does all this for you in seconds with one command.
Here is the exact lifecycle of a deployment:
- You push code: You type
git push shipdeck mainin your terminal. - It compiles your app: ShipDeck's SSH server intercepts the code, extracts it, and automatically builds an isolated software container (using Docker).
- Zero-Downtime Swap: ShipDeck starts the new version on a randomized port and checks its health. Once verified, it atomic-renames the container names to route traffic to the new version and shuts down the old one seamlessly.
- Dynamic Routing: The built-in proxy detects the healthy container and routes domain calls (e.g.
http://my-app.localhost:8080) to the right port dynamically. - Auto-Scaling Protection: A Java monitor agent watches the server load. If it detects a resource spike, it calls the proxy to automatically spin up duplicate containers and balance traffic across them!
shipdeck/
├── proxy/ <-- Gateway router, Load balancer & Dashboard server (TS)
│ ├── src/
│ │ ├── proxy.ts <-- Raw TCP load-balancer, telemetry endpoint & SSE server
│ │ └── dashboard.html <-- Live developer metrics & logs terminal web console
│ ├── package.json
│ └── tsconfig.json
│
├── deployer/ <-- SSH receiver & Git deployment compiler engine (TS)
│ ├── src/
│ │ └── git-daemon.ts <-- Custom SSH Git handler, Docker builder & health poller
│ ├── package.json
│ └── tsconfig.json
│
├── agent/ <-- Lightweight JVM resource monitor agent (Java)
│ ├── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── shipdeck/
│ │ └── MonitorAgent.java <-- Reads cgroups & MXBean, streams metrics
│ └── pom.xml <-- Maven setup rules
│
├── package.json <-- Monorepo configuration
└── README.md <-- You are here!
Before running the cluster, ensure you have these installed:
- Docker Desktop (Make sure Docker is active and running)
- Node.js (v20+ or Bun runtime)
- Java JDK (v11 or higher, JDK 21 recommended)
- Git CLI
To boot up the complete PaaS platform, open three terminal windows and run the following commands:
Serves the proxy, balances traffic, handles telemetry, and hosts the visual dashboard:
cd proxy
npm run devListens for incoming ssh code pushes on port 2222:
cd deployer
npm run devTracks CPU/RAM and streams metrics to the gateway:
cd agent
java -cp target/classes com.shipdeck.MonitorAgentWith all three servers running, let's deploy a test application.
cd ~/Desktop
mkdir test-deploy && cd test-deploy
git init
git commit --allow-empty -m "Initial commit"Add your self-hosted PaaS as a Git remote:
git remote add shipdeck ssh://git@127.0.0.1:2222/test-deploy.gitgit push shipdeck main- Open your browser and navigate to
http://127.0.0.1:8080/dashboard. - Push your code using
git push shipdeck main. - Watch the dashboard's Orchestrator Activity Log console. You will see the entire git clone, Docker compile steps, container startup, and successful blue-green swap logs stream live!
- Once completed, your application is live at
http://test-deploy.localhost:8080(tested viacurl -H "Host: test-deploy.localhost" http://127.0.0.1:8080). - Keep the dashboard open. In a few seconds, the Java Agent will simulate a resource spike. The dashboard will trigger a system warning, and you will see the auto-scaler dynamically spin up a duplicate container and add it to the Active Domain Routing Pools table automatically!