Teral

Deploy your first app

Go from a GitHub repository to a running app.

This guide deploys an app from a GitHub repository. To run a container image you already built, see Container images.

You need a Teral account and a repository with an app that serves HTTP. A Dockerfile is optional.

Create a project

In the dashboard, open your workspace and select New project. Give it a name. Teral suggests a slug from the name, which you can change. The slug appears in your app's URLs.

Create an app

A project holds one or more apps. Name the first one, then choose Import from GitHub as the source.

If the Teral GitHub App isn't installed yet, Teral asks you to install it. You can give it access to all repositories or only some.

Pick the repository

Select the account and repository. Teral reads the repository to suggest settings.

Check the settings

Teral fills in defaults. The ones people change most:

  • Root directory: where your app lives in the repository, for example services/api. Leave . for the repository root.
  • Dockerfile: leave it on Automatic to let Teral build without one, or pick the Dockerfile to use.
  • Port: the port your app listens on. Teral also passes it to your app as PORT. The default is 8080.

Everything else, such as CPU, memory and regions, can stay as it is. You can change all of it later under App settings.

Add variables

Add the environment variables your app needs, such as a database URL. You can paste a .env file. See Variables.

Deploy

Select Deploy. Teral builds the image and starts it. The build log streams on the deployment page. When the status is Ready, the page shows your app's URLs.

After the first deployment

From now on every push deploys:

  • Pushes to the default branch, usually main, deploy to production.
  • Pushes to other branches deploy to preview, with their own URL per branch.

Next, you might want to:

Edit on GitHub

On this page