---
title: Components
description: Components are what Kapten runs in an environment, applications built from GitHub or pulled from an image, jobs that run once or on a schedule, and databases.
---

A **component** is something Kapten runs in an [environment](/concepts/environments). There are three kinds: applications, jobs and databases. Every deployment of a component is a **run**, with its status, a timeline of its steps and its logs.

## Applications

An **application** is a long-running service, such as a web app, an API or a queue worker. Its source is one of:

- **GitHub**: a repository and branch from a connected [GitHub installation](/guides/deploy-from-github). Kapten builds a container image from the repository with [Railpack](https://railpack.com), which detects the language and framework, and can rebuild automatically on every push to the branch.
- **Container**: an image name and tag from a container registry.

An application also defines:

| Setting | Description |
| --- | --- |
| Resources | CPU and memory requests and limits, and an optional GPU count. See [Resources](/reference/resources). |
| Instances | Minimum and maximum number of running instances. |
| Ports | Internal ports the application listens on, each with a protocol: `HTTP`, `GRPC`, `TCP` or `UDP`. One port is the default. |
| Storage | Persistent volumes, each with a mount path, a size in GiB and a Kubernetes storage class. |
| Health checks | A readiness probe, which decides when an instance receives traffic, and a liveness probe, which restarts an instance that stopped responding. Each is an HTTP, TCP, gRPC or command check. |
| Runtime command | An entrypoint and arguments that replace the image's own. |

## Jobs

A **job** runs a container until it exits. It is either:

- **cron**: run on a schedule written in the standard five-field cron syntax (`minute hour day month weekday`), in UTC unless you set a time zone;
- **one-time**: run once, when you deploy it.

A job sets the same resources as an application, plus the maximum number of restarts allowed before the run fails (`0` allows none) and the maximum duration after which it is stopped and marked failed.

## Databases

A **database** is a PostgreSQL, MySQL, MongoDB or Redis instance. It is provisioned either:

- **in cluster**: Kapten runs the database on the environment's cluster;
- **managed**: Kapten provisions the database service of your cloud provider.

You choose its engine version, whether it is reachable only from inside the cluster (`PRIVATE`) or from the internet (`PUBLIC`), its resources, and whether to enable disk encryption, high availability and backups.

Kapten generates the database's credentials and adds them to the environment as [secrets](/concepts/variables-and-secrets#database-secrets), so your applications can connect without copying passwords around.
