How deploys work

Connect a repo once. After that, you deploy by pushing to your main branch.

This page covers the GitHub flow. You point Dockhold at a repo, and every push to your main branch ships a new version. Here is what happens from your push to your app being live. No repo? You can alsodeploy a local folderwith one command.

The flow

  1. You push to the main branch of a connected repo.
  2. GitHub notifies Dockhold that a push happened.
  3. Dockhold builds your app. On a paid plan it detects your stack and builds an image for you, with no build config. On a free account it builds from the Dockerfile at your repo root.
  4. The new version goes live with a rolling update. The old version keeps serving until the new one is healthy, so there is no downtime. The exception is an app with app storage: it is stopped first and then started again, so it is unreachable for a few seconds.

Your app stays at the same URL across deploys:https://your-app.dockhold.app. You can watch each build happen live in your dashboard.

Your first deploy

  1. Push to GitHub. Put your app in a GitHub repository.
  2. Connect the repo. Open the dashboardand connect it. On a paid plan Dockhold auto-detects the stack (Node, Python, Go, Rust, Ruby, Deno, Bun, Java, PHP) and builds it. On a free account, add a Dockerfile at the repo root and it builds from that.
  3. Go live. Your app comes up at its dockhold.app URL.

One rule matters above all: your app must listen on 0.0.0.0and read its port from the PORT environment variable. Don't hardcode a port and don't bind to localhost, or traffic can't reach it. See the Quickstart for examples.

Auto-deploy on push

How auto-deploy gets set up depends on how you connected the repo:

  • Connected with the GitHub app: auto-deploy is on from the start. Every push to your main branch deploys. Nothing else to do.
  • Using a personal access token instead: turn on auto-deploy in your app's GitOps settings, then add the push webhook it shows you to your repo on GitHub (Settings, then Webhooks). Pick theapplication/json content type and the push event.

Either way, Dockhold verifies every push notification cryptographically before it builds, so no one can trigger a deploy to your app without your secret. You can rotate that secret anytime from GitOps settings. Update it on GitHub at the same time so the two stay in sync.

Custom builds

Add a Dockerfile at the repo root and Dockhold uses it as-is. It never overrides your Dockerfile. To point at one in a subfolder, add a dockhold.json at the root:

{ "build": { "dockerfile": "path/to/Dockerfile" } }

Free accounts need a Dockerfile. Automatic stack detection, which builds a repo that has no Dockerfile, is included once you add compute. New to this?Dockerfiles and dockhold.json explains what these files are and has copy-paste templates for Node, Python and Go.

Next: write your first Dockerfile,connect a private repo, or set up environment variables and secrets.

Suggested guides
to move to openEsc to closeFrom the Dockhold docs