Skip to Content
We are live but in Staging 🎉
ComputeRecipesDeploy from a git repo

Deploy from a git repo

Goal: deploy an image built straight from a git repository. You give the platform a repo URL and a ref; it clones at build time (so a large repo never ships through the API) and builds an image. With no Dockerfile, Cloud Native Buildpacks (Paketo) auto-detect the language and build for you — no Dockerfile authoring. Add a Dockerfile and you force Kaniko instead.

This applies the image — build from git branch of Code & Runtimes.

You own the HTTP server. Like all image-mode apps, your code runs your own server — listen on $PORT and answer POST /. There’s no managed handler(payload, ctx); the platform threads the x-ignite-* request headers into the pod.

Shape:

git repo ──► app create ──► draft save ──► draft publish ──► invoke (your server, (no runtime) (--git-url <url> (Buildpacks or (your optional --git-ref main Kaniko clones & container Dockerfile) [--dockerfile-path Dockerfile]) builds → version 1) serves it)

Prerequisites

  • The dodil CLI installed and authenticated — dodil ignite config set token <token> and dodil ignite config set api_endpoint rpc.dev.dodil.io:443 (or export DODIL_TOKEN=<token>). See CLI Basics.
  • Your org name for the org:name ID form. We use acme-corp.
  • A git repo the platform can reach. We use a public example: `https://github.com/acme-corp/greeter-service` whose root has a server that listens on $PORT.

1. Create the app

No --runtime — image-mode apps are defined by their source:

dodil ignite app create greeter --description "Greeter service built from a git repo"

The app id is now acme-corp:greeter.

2. Save — Buildpacks (no Dockerfile)

For the build-from-git path the source flags are --git-url and --git-ref (a branch, tag, or commit SHA). Omit --dockerfile-path and Buildpacks auto-detect the language from the repo and produce a runnable image:

dodil ignite draft save acme-corp:greeter \ --git-url https://github.com/acme-corp/greeter-service \ --git-ref main

Buildpacks detect Python/Node/Go/… from the lockfiles and entrypoints in the repo — no Dockerfile required.

3. Save — Kaniko (with a Dockerfile)

If the repo has a Dockerfile and you want it built exactly, add --dockerfile-path (path relative to the repo root, or to --git-sub-path if set). The presence of --dockerfile-path switches the builder to Kaniko:

dodil ignite draft save acme-corp:greeter \ --git-url https://github.com/acme-corp/greeter-service \ --git-ref main \ --dockerfile-path Dockerfile

Useful extras on this path:

  • --git-sub-path <dir> — build from a subdirectory of a monorepo (Dockerfile path is resolved under it).
  • --build-arg K=V — repeatable build-time variables, mapped to ARG in the Dockerfile.
dodil ignite draft save acme-corp:greeter \ --git-url https://github.com/acme-corp/monorepo \ --git-ref v1.4.0 \ --git-sub-path services/greeter \ --dockerfile-path Dockerfile \ --build-arg APP_ENV=prod

The source flags are mutually exclusive. --git-url builds from a repo; for an uploaded local context use --code (Build an image from your code), and for a prebuilt image use --image-ref (Run a prebuilt image).

4. Private repos — a git Secret

For a private repo, the platform needs a credential to clone. Create a git Secret first, then reference it with --git-secret-ref:

dodil ignite secret create greeter-git \ --type git \ --token "$GITHUB_PAT"
dodil ignite draft save acme-corp:greeter \ --git-url https://github.com/acme-corp/greeter-private \ --git-ref main \ --git-secret-ref greeter-git

--git-secret-ref works with both the Buildpacks and the Dockerfile variants. See Secrets for the exact secret fields and types your account supports.

5. Publish

Publishing triggers the clone-and-build and, on success, cuts an immutable version pointing at the built image_ref. Builds run through Builds — follow them with the build/compile logs:

dodil ignite draft compile-logs acme-corp:greeter dodil ignite draft publish acme-corp:greeter

After the first publish the app gets a direct FQDN`greeter-acme-corp.ignite.dodil.cloud` (port 80). Verify:

dodil ignite app get acme-corp:greeter -o json | jq '{active_version, public_urls}'

6. Invoke

dodil ignite invoke acme-corp:greeter -p '{"name": "ada"}'
{ "greeting": "Hello, ada!", "execution_id": "01J..." }

Cold start note

Git-built apps run a container image, so the cold start includes pulling image layers on a cold node — heavier than the compile path. Keep the image small or keep pods warm with ScalingConfig.reserved_capacity > 0. See API Reference → Cold starts vs warm pods.

Iterating

Push a new commit, then draft save with the new --git-ref (or the same branch to pick up its head) and draft publish to rebuild and cut a version. Roll back with dodil ignite version rollback acme-corp:greeter <version>.

Common gotchas

SymptomCauseFix
Clone fails with auth errorPrivate repo without a credentialCreate a git dodil ignite secret create and pass --git-secret-ref
Build used Buildpacks but you wanted your Dockerfile--dockerfile-path omittedAdd --dockerfile-path Dockerfile to force Kaniko
Buildpacks can’t detect the languageRepo root has no recognizable entrypoint/lockfileAdd a Dockerfile (+ --dockerfile-path) or point --git-sub-path at the service dir
Dockerfile not foundPath is relative to repo root (or --git-sub-path)Set --dockerfile-path relative to the build context, e.g. --git-sub-path services/greeter --dockerfile-path Dockerfile

See also