> ## Documentation Index
> Fetch the complete documentation index at: https://inframan.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy

> Push to GitHub and Inframan builds, releases and routes your application on your own infrastructure, as one versioned revision.

You describe an application once, in an `inframan.yaml` at the root of its repository. From then on, a push to a matching branch is a release: Inframan builds each service that changed, runs your migrations, deploys everything as one new **revision**, and moves traffic to it only when every service is healthy.

The whole pipeline runs on your infrastructure. Builds happen in your cluster or your project, images go to your registry, and there's no third-party CI service in the path.

## What a push does

```mermaid theme={null}
flowchart LR
  A[git push] --> B[Match pipelines]
  B --> C[Build changed services]
  C --> D[Pre-deploy steps]
  D --> E[Deploy the new revision]
  E --> F[Post-deploy steps]
  F --> G{All services healthy?}
  G -- Yes --> H[Move traffic]
  G -- No --> I[Keep traffic on the last revision]
```

1. GitHub tells Inframan about the push. Inframan finds the [pipelines](https://inframan.mintlify.site/deploy/pipelines.md) whose event and branch pattern match.
2. Each service's image is built from its `Dockerfile`. A service whose files didn't change reuses its last image. See [Builds](https://inframan.mintlify.site/deploy/builds.md).
3. **Pre-deploy steps** run as Kubernetes Jobs inside the cluster, with the service's own environment, so database migrations can reach the database.
4. Every service is deployed as part of a new, numbered revision, and Inframan waits for it to become ready.
5. **Post-deploy steps** run, for example to warm a cache or notify another system.
6. When every service is up, traffic moves to the new revision. If any service fails, traffic stays where it was and you're alerted.

## Why it's built this way

> [card] [Releases are revisions](https://inframan.mintlify.site/deploy/revisions.md)
>
> Every release is an immutable snapshot of all your services. Send traffic to the latest, pin an older one, or split traffic between them. Rollback is one change.

> [card] [Services talk to their own release](https://inframan.mintlify.site/deploy/connections.md)
>
> A service that calls another reaches the version that shipped with it, even while you split traffic at the edge.

> [card] [Config lives in your repo](https://inframan.mintlify.site/deploy/inframan-yaml.md)
>
> `inframan.yaml` is the source of truth. Changes you make in the console become a pull request, so nothing drifts from Git.

> [card] [Free TLS for every domain](https://inframan.mintlify.site/deploy/domains.md)
>
> Attach a domain and it gets a Let's Encrypt certificate that renews itself, with HTTP redirected to HTTPS.

## What you need

* A **Ready** infrastructure. See [Create an infrastructure](https://inframan.mintlify.site/provision/create-infrastructure.md).
* **GitHub** connected to Inframan. See [Connect GitHub](https://inframan.mintlify.site/deploy/connect-github.md).
* A **Dockerfile** for each service. Inframan builds container images from Dockerfiles.
* A **domain**, if the application should be reachable from the internet. Services have no public address until you give them a domain. See [Custom domains](https://inframan.mintlify.site/deploy/domains.md).

## Start here

> [card] [Create an application](https://inframan.mintlify.site/deploy/create-application.md)
>
> Pick a repository and Inframan opens a pull request with your `inframan.yaml`.

> [card] [inframan.yaml reference](https://inframan.mintlify.site/deploy/inframan-yaml.md)
>
> Every field, its default and how it's validated.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.