> Index of every page on this site: [llms.txt](https://docs.a-line.cloud/llms.txt)

# App file

> An application deployed within a project.

Schema definition: `AppFile`.

Optional fields follow one rule: leaving a key out of the file leaves
the stored value alone.

## Example

A minimal `projects/<project>/apps/<app>.yaml`, with the files it refers to first:

```yaml title="clusters/hetzner-fsn1.yaml" iac
# yaml-language-server: $schema=https://a-line.cloud/schemas/iac/v1.json
version: 1
provider: hetzner
region: fsn1
pools:
  - name: control-plane
    role: control_plane
  - name: general
```

```yaml title="projects/web/project.yaml" iac
# yaml-language-server: $schema=https://a-line.cloud/schemas/iac/v1.json
version: 1
name: web
cluster: hetzner-fsn1
```

```yaml title="projects/web/apps/api.yaml" iac
# yaml-language-server: $schema=https://a-line.cloud/schemas/iac/v1.json
version: 1
source:
  image: ghcr.io/example/api:1.4.2
port: 8080
```

## Fields

### `allow_delete`

Type: `boolean`, optional.

Let removing this file delete the resource (held until confirmed).

### `auto_update`

Type: `boolean`, optional.

Watch a public image for updates.

### `autoscaling`

Type: [`AutoscalingSpec`](/iac/reference/types#autoscalingspec), optional.

Autoscaling configuration.

### `backup`

Type: [`BackupSpec`](/iac/reference/types#backupspec), optional.

The template (database) backup settings.

### `backup_policies`

Type: list of [`BackupPolicySpec`](/iac/reference/types#backuppolicyspec), optional.

A per-app backup policy.

### `build_size`

Type: `string`, optional.

The build size tier slug.

### `connections`

Type: list of [`ConnectionSpec`](/iac/reference/types#connectionspec), optional.

Connections from this app to other apps of the project.

### `cron_jobs`

Type: list of [`CronJobSpec`](/iac/reference/types#cronjobspec), optional.

A cron job of the app.

### `databases`

Type: map of [`DatabaseSpec`](/iac/reference/types#databasespec), optional.

Databases of a Postgres or ClickHouse app, with their groups and
lease roles.

### `delete_data`

Type: [`DeleteDataSpec`](/iac/reference/types#deletedataspec), optional.

What a removal deletes along with the item; never exported.

### `deploy`

Type: [`DeploySpec`](/iac/reference/types#deployspec), optional.

The rollout settings.

### `domains`

Type: list of [`DomainSpec`](/iac/reference/types#domainspec), optional.

Domain routing rules.

### `egress`

Type: [`EgressSpec`](/iac/reference/types#egressspec), optional.

The app's own outbound mode and allowlist; no `mode` follows the
project. Leaving the key out leaves the stored settings alone.

### `env`

Type: map of [`EnvValue`](/iac/reference/types#envvalue), optional.

Environment variables: plain values, refs to resource outputs
(`{from: bucket/uploads, output: endpoint}`) or `{external: true}`
keys whose value is set in A-Line.

### `gpu_count`

Type: `integer`, optional, format `uint32`.

The `gpu_count` key.

### `health_path`

Type: `string`, optional.

Health check path.

### `health_port`

Type: `integer`, optional, format `uint16`.

The port health checks probe, if not the primary port.

### `http`

Type: [`HttpSpec`](/iac/reference/types#httpspec), optional.

HTTP settings; a partial mapping merges over the current settings.

### `iac_path`

Type: `string`, optional.

Override path to a-line.yaml within the source repo.

### `iac_repo`

Type: `string`, optional.

Repository reference for app-scoped IaC (e.g. "github.com/org/repo").

### `instances`

Type: `integer`, optional, format `uint32`.

Instance count of a template that sizes by instances (postgres,
valkey, clickhouse, ...), within the template's bounds; counted
against the project quota. A stopped app keeps it for its next start.

### `isolation`

Type: `string`, optional.

Runtime isolation: "standard" (default) or "sandboxed" (Kata where a
pool offers it, else gVisor).

### `lease_files`

Type: list of [`LeaseFile`](/iac/reference/types#leasefile), optional.

Leased credentials mounted as files.

### `name`

Type: `string`, optional.

Optional: defaults to the file name, and must match it when set.

### `namespace_isolation`

Type: `string`, optional.

Namespace isolation: "shared" (default, the project's namespace) or
"dedicated" (a namespace of its own, whose Pod Security level follows
this app alone). A dedicated app supports a subset of features: no
template, domains, HTTP routes, workload namespace, connections,
backups, borrowed volumes or `ingress.from_apps`.

### `pod`

Type: [`PodSettings`](/iac/reference/types#podsettings), optional.

Pod-spec overrides (resources, probes, sidecars, tolerations, ...).
Leaving the key out leaves the stored value alone; only a file that sets `pod` can change it.

### `pool`

Type: `string`, optional.

The node pool the app is pinned to; `pool: null` unpins it.

### `port`

Type: `integer`, optional, format `uint16`.

Primary container port.

### `ports`

Type: list of [`PortEntry`](/iac/reference/types#portentry), optional.

Every port the app listens on; the first is the primary port.

### `registry_credential`

Type: `string`, optional.

A registry credential by name (granted to the link).

### `replica_mode`

Type: `string`, optional.

The existing `replica_mode` values.

### `replicas`

Type: `integer`, optional, format `uint32`.

Number of replicas (static).

### `require_kata`

Type: `boolean`, optional.

Require Kata (no gVisor fallback); implies "sandboxed".

### `roles`

Type: map of [`ValkeyRoleSpec`](/iac/reference/types#valkeyrolespec), optional.

Lease roles of a Valkey app.

### `secrets`

Type: list of `string`, optional.

Names of the environment's secret groups linked to the app; `[]`
unlinks them all.

### `source`

Type: [`SourceSpec`](/iac/reference/types#sourcespec), optional.

Where the container comes from: an image, a git build or a
template. Leaving it out leaves an existing app's source alone;
creating an app needs it.

### `storage_bindings`

Type: list of [`StorageBindingSpec`](/iac/reference/types#storagebindingspec), optional.

A bucket bound to the app (granted to the link).

### `triggers`

Type: [`TriggersSpec`](/iac/reference/types#triggersspec), optional.

What deploys the app.

### `version`

Type: [`SchemaVersion`](/iac/reference/types#schemaversion), required.

The IaC schema version this file is written for.

### `volume_mounts`

Type: list of [`VolumeMountSpec`](/iac/reference/types#volumemountspec), optional.

The `volume_mounts` key: volumes of other apps of the project,
mounted read-only.

### `volumes`

Type: list of [`VolumeSpec`](/iac/reference/types#volumespec), optional.

A persistent volume of the app.

### `workload_namespace`

Type: [`WorkloadNamespaceSpec`](/iac/reference/types#workloadnamespacespec), optional.

The workload namespace's egress policy and quotas.
