Git-Based Deployments

Learn how TurboV automates application builds and updates from your Git repositories.


1. Connecting GitHub

TurboV connects to GitHub via a modern GitHub App:

  1. In the dashboard, click Add App (or open an existing project and select New Application).
  2. Click Connect GitHub. You will be redirected to GitHub to authorize the TurboV GitHub App.
  3. Choose the target organization or personal account, and select repository permissions:
    • All repositories: Convenient for personal accounts.
    • Only select repositories: Recommended for organizations to enforce least-privilege security.
  4. Once authorized, return to TurboV and pick your repository from the searchable list.
Deploying Private Repositories

TurboV requests temporary, installation-scoped tokens when cloning code. Private repositories deploy automatically with zero SSH key management.


2. Branch Configuration & Push-to-Deploy

By default, TurboV listens for webhook events on your configured branch (e.g. main or production):

git push origin main
         │
         ▼
[GitHub Webhook: push event]
         │
         ▼
[TurboV Backend: verify payload & resolve environment]
         │
         ▼
[Agent Deployment Processor: trigger blue-green pipeline]
  • Automatic Redeployment: When a commit lands on your branch, a deployment begins immediately.
  • Commit Metadata: TurboV captures commit hash, author name, avatar, and message to display in your deployment history.
  • Deploying Other Branches: You can manually trigger deployments from any branch, tag, or pull request directly from the Deployments tab.

3. Monorepo Configuration

If your application code lives within a larger monorepo (e.g. Turbo, Nx, Lerna, Yarn Workspaces):

  1. Open your application settings in the dashboard.
  2. In the Build Configuration section, specify the Root Directory:
    apps/web
    
  3. Set custom Build Command and Run Command if needed:
    • Build Command: turbo build --filter=web
    • Run Command: node dist/main.js

During the build phase, the agent sets the working directory to your specified root folder so that relative file paths, lock files, and node modules resolve cleanly.


4. Zero-Downtime Blue-Green Lifecycle

Deployments in TurboV never drop incoming user traffic:

Step 1: Clone       Shallow clone of commit SHA into /var/lib/turbov/builds/<appId>
Step 2: Build       Build tagged Docker image 'turbov-app-<name>:<sha>'
Step 3: Launch      Start new container on dynamic internal bridge port (e.g. 41824)
Step 4: Healthcheck Poll HTTP endpoint (/health or /) until HTTP 200 returned
Step 5: Switch      Write dynamic routing rule to /var/lib/turbov/traefik/dynamic/<appId>.yml
Step 6: Traefik     Traefik hot-reloads routing table in memory (<5ms)
Step 7: Drain       Previous container receives SIGTERM, drains for 10s, then terminates

Traffic smoothly transitions from the old container to the new container only after the new container has proven healthy.


5. Deployment Controls & Rollbacks

Cancelling In-Progress Builds

If you push a new commit while a build is already in progress, or realize you deployed the wrong branch, click Cancel Deploy in the dashboard. The agent immediately terminates the build process; the current live container continues serving traffic unharmed.

One-Click Rollbacks

If a newly deployed version introduces bugs in production:

  1. Open the Deployments tab.
  2. Locate any previously successful deployment.
  3. Click Rollback.
  4. TurboV points Traefik back to the previous image tag in seconds—no rebuilding required.