Skip to main content

Worker Applications

Main

The Main tab is where the most common configuration options are set.

Container Settings

Start Command

The start command is the start command of the Docker container that is run for each application instance. If a start command is not set, the default start command of the Docker container is run.

It is best to avoid special characters or quotation marks in this start command, since these may not be escaped properly when the container is started.

Deploy Webhook

Auto-deploy when webhook is called

This option allows you to expose a webhook for your application which can update the container image that's running. This is useful for programmatically redeploying a Docker image from an automated script.

info

For more information about webhooks and auto-deployment, see the docs on programmatic Docker deployments

Resources

RAM

The RAM value is the amount of memory to assign your application, given in mebibytes (Mi). A mebibyte is roughly equivalent to 1.05 megabytes, so it allocates slightly more memory than a megabyte. For example if you are migrating from a service where 2 GB is used, 2000Mi should be more than sufficient.

When your application exceeds its permitted RAM, it is killed.

CPU

The CPU value is the amount of CPU to assign your application, given in millicores. A millicore is 1/1000 of a CPU. Thus, to assign your application an entire CPU, set this value to 1000m.

When your application exceeds its permitted CPU, it may be throttled depending on other workloads running on the machine.

Autoscaling

You can enable autoscaling based the amount of CPU and RAM that your application uses:

  • Minimum replicas -- the minimum number of instances of your application to run.
  • Maximum replicas -- the maximum number of instances of your application to run.
  • Target CPU Utilization -- the threshold of CPU usage that your application needs to consume before it is autoscaled. For example, if you allocate 2 CPU (2000m) to your application and 1 instance is running, autoscaling will be triggered once your application reaches 1 CPU.
  • Target RAM Utilization -- the threshold of RAM usage that your application needs to consume before it is autoscaled. For example, if you allocate 2000 Mi to your application and 1 instance is running, autoscaling will be triggered once your application reaches 1000 Mi.

Environment

In this section, you can set environment variables for your application. You can input these directly, load them from an environment group, or copy them from a file that uses .env formatting.

Advanced

Persistent Disks

Persistent disks mount a persistent filesystem into your application instance that can retain data across releases:

  • Persistent Storage -- the amount of storage allocated to this filesystem, given in Gibibytes. One gibibyte is roughly equivalent to 1.075 gigabytes.
  • Mount Path -- the absolute path within your Docker container to mount this filesystem. Note that setting this to an existing directory that your application uses can lead to unexpected behavior, so it is usually better to set this mount path to a root-level directory such as /mount.

Termination Grace Period

The termination grace period is the number of seconds after SIGTERM is sent before the application will be forcefully killed. This is documented in detail in the Zero-Downtime Deployments guide.