Orbit Engine is a lightweight Docker container orchestrator and reverse proxy dashboard written in TypeScript and designed to run on the
Bun runtime. It allows you to dynamically deploy Docker containers and route local traffic to them via subdomains (e.g.,
http://.localhost:8000 ).
──────
When you start the project (via index.ts):
• It calls docker.ts to ensure a private Docker bridge network named orbit-net exists. • It launches the Proxy Server on port 8000 and the API Server on port 3030 .
• Listens on port 8000 using Bun.serve . • Resolves the subdomain of the incoming request (e.g., my-web from my-web.localhost:8000 ). • Queries Docker (via docker inspect ) to get the internal IP address of the container on the orbit-net network. • Proxies the HTTP request dynamically to the container's IP on port 80 using fetch .
• Listens on port 3030 using Bun's built-in router. • Exposes the following routes from docker.routes.ts: • GET /api/containers : Retrieves and lists active Docker containers, mapping details like ID, name, image, and status. • POST /deploy : Accepts a JSON body containing a container { name, image } . It pulls the image, creates the container attached to the orbit-net network, and starts it. • Exposes static routes from static.routes.ts: • GET / : Serves the control panel interface from index.html.
• A clean, dark-themed dashboard styled with Tailwind CSS. • Allows you to input a custom name and a Docker image (e.g. nginx:alpine ), deploy it, watch the live status, and quickly open the dynamic subdomain link. ──────
• package.json: Configures dependency metadata ( http-proxy and dockerode are defined as dependencies, although the codebase actually spawns the docker CLI directly via Bun.spawn in docker.ts). • index.ts: Application entry point. • docker.ts: Interacts with Docker by spawning processes (e.g. docker ps , docker pull , docker inspect , etc.) and manages container network operations. • proxy.ts: Handlers for routing subdomain requests to container private IPs. • api.ts: Configures the Bun HTTP server listening on port 3030 for API endpoints and static files. • index.ts: Aggregates docker.routes.ts and static.routes.ts. • utils.ts: Contains helper utilities like log wrappers. ──────
• Scanned the workspace structure and main package config. • Evaluated entry files, Docker wrappers, proxy behavior, routes, and frontend templates. • Documented the orchestrator workflow, showing how it initializes networks, deploys containers, and routes subdomain traffic.