Deployment Workflow
When you create a deployment, DeployHub orchestrates a multi-stage process:1
Project Creation
Your project is created with status
pending and assigned a unique subdomain (e.g., myapp-a8c7d2).2
Build Queue
The project is added to the BullMQ build queue for processing by a dedicated build worker.
3
Repository Cloning
Build worker clones your repository using GitHub access tokens (if authenticated) or public access.
4
Docker Build
Application is containerized using project-type-specific Dockerfiles with your build configuration.
5
Image Push
Docker image is pushed to Docker Hub registry for deployment.
6
Container Deployment
Deploy worker creates and starts a container on the
users network with your environment variables.Supported Project Types
Static Sites
Static sites (React, Vue, Vite, etc.) are built and served with Nginx. Build Process:Static sites are served on port 80 and automatically configured with Nginx for optimal performance.
Node.js Applications
Node.js applications are containerized with your custom start command and port configuration. Build Process:Monorepo & Folder Support
DeployHub supports deploying specific folders from monorepos using Git sparse-checkout:Build Worker Architecture
Builds are processed by BullMQ workers with concurrency control:active- Build starts processingcompleted- Build succeeds, triggers deployment queuefailed- Build fails, updates project status tofailed-deploy
Deployment Worker
After successful builds, the deployment worker creates and starts containers:All containers run on the
users Docker network for isolation and routing through the reverse proxy.Redis Caching
Subdomain-to-project mappings are cached in Redis for fast routing:Automatic Redeployment
DeployHub intelligently handles redeployments by checking commit history:- Previous build failed
- New commit detected on the branch
- Otherwise, existing Docker image is reused
Build Cleanup
Build artifacts are automatically cleaned up after processing:Project Status Flow
Status States:pending- Project created, awaiting configurationbuilding- Build or deployment in progresslive- Application running and accessiblefailed-deploy- Build or deployment faileddeleted- Project marked for deletion