> ## 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.

# Create an application

> Register a GitHub repository as an application. Inframan detects its services and opens a pull request with its inframan.yaml.

An **application** is a GitHub repository and branch, deployed to one or more infrastructures. Each deployable part of it, such as an API or a worker, is a **service**.

Creating an application doesn't deploy anything by itself. Inframan detects your services, then opens a pull request that adds an `inframan.yaml` to the repository. Merging that pull request is your first release.

## Before you begin

* A **Ready** infrastructure with at least one application node pool. See [Create an infrastructure](https://inframan.mintlify.site/provision/create-infrastructure.md).
* [GitHub connected](https://inframan.mintlify.site/deploy/connect-github.md), with the app installed on the repository.
* A `Dockerfile` for each service.
* Optionally, an active [custom domain](https://inframan.mintlify.site/deploy/domains.md) for each service that should be public. You can add one later.

## Create it in the console

**1. Start**

Go to **Applications** and click **New application**.

**2. Pick the code**

Choose the **GitHub account**, the **GitHub repository** and the **Branch**. Inframan reads the repository while it shows **Detecting project structure...**.

If the repository's `inframan.yaml` declares several applications, choose one in **Application**.

**3. Name it**

Enter the **Application name** and the **Namespace**, which defaults to the name. Both are permanent: Inframan uses them to find the application's workloads, so they can't change after creation.

**4. Choose where it runs**

Under **Pipelines**, every pipeline is selected, each tagged with its infrastructure's tag. The pipelines you leave selected decide which infrastructures the application is created on and which pushes deploy it. See [Pipelines](https://inframan.mintlify.site/deploy/pipelines.md).

**5. Review the services**

**Services** shows a card for each service Inframan detected, with its **Port**, **Domain** (or **None (internal)**), **Path** and start command. Click **Configure** on a card for its **Environment**, **Scaling** and **Network** settings.

> [!TIP]
>
> Open **Scaling** and choose the **Autoscaling mode**. **Request-based (KPA)** needs [Knative](https://inframan.mintlify.site/provision/add-ons/knative.md) on the infrastructure. If Knative isn't installed, choose **Resource-based (HPA)** or **Fixed**.

Secrets can't be set here. Add them after creation. See [Environment variables and secrets](https://inframan.mintlify.site/deploy/environment-variables.md).

**6. Open the pull request**

Click **Open PR for N services**, choose the **Base branch** the pull request should target, and create it.

Inframan opens a pull request titled **Inframan: register \<application>** that adds `inframan.yaml` to the root of the repository.

**7. Merge to release**

Review the file and merge. The merge is a push to the base branch, so it releases on every selected pipeline whose branch pattern matches it. Watch it on the application's **Deployments** tab, or in the commit's status checks on GitHub.

> [!WARNING]
>
> If the repository already has an `inframan.yaml`, the pull request replaces it with one written from the form. Check the diff before you merge, and keep anything the form doesn't cover, such as other applications' sections, workers and comments.

## How services are detected

* **With an `inframan.yaml`:** its `services:` are the application's services, exactly. An invalid file is refused with the reason, so fix it and push before creating the application.
* **Without one:** Inframan looks for a `Dockerfile` and for language files such as `package.json`, `go.mod`, `requirements.txt`, `Gemfile`, `pom.xml` and `Cargo.toml`, at the root and one directory down. Two or more directories with these files make a monorepo with one service per directory.

The console creates web services. To add a worker or a job, declare it in `inframan.yaml`. See [Services and runtimes](https://inframan.mintlify.site/deploy/services.md).

## Names

The application name must be lowercase, unique in the instance, and match `application:` in `inframan.yaml`. Inframan doesn't rewrite a name you give it.

## Create it with an AI assistant

A connected assistant reads the repository with `detect_repository`, then creates the application with `create_application` from the repository's `inframan.yaml`. It refuses a file that's invalid, or one that leaves out `node_pool` when the infrastructure has several application pools. See [Connect an AI assistant](https://inframan.mintlify.site/get-started/ai-assistants.md).


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