Skip to main content
DeployHub provides a fully automated deployment pipeline that transforms your GitHub repository into a live application. The system handles everything from code cloning to Docker containerization and deployment.

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:
Dockerfile Template:
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:
Dockerfile Template:

Monorepo & Folder Support

DeployHub supports deploying specific folders from monorepos using Git sparse-checkout:
Enable folder deployment in project settings to deploy a specific subdirectory from your repository.

Build Worker Architecture

Builds are processed by BullMQ workers with concurrency control:
Worker Events:
  • active - Build starts processing
  • completed - Build succeeds, triggers deployment queue
  • failed - Build fails, updates project status to failed-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:
Redeployment triggers a rebuild when:
  • 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 configuration
  • building - Build or deployment in progress
  • live - Application running and accessible
  • failed-deploy - Build or deployment failed
  • deleted - Project marked for deletion

API Reference

Create Deployment

The buildCommand and publishDir are required for static projects. The startCommand and port are required for Node.js projects.

Response