Skip to content

App from Git

In Settings → Git accounts (Configurações → Contas Git), connect GitHub, GitLab, Gitea or Bitbucket with an access token. Public repositories do not need an account. For repositories in the git@… format, register a key in Settings → SSH keys (Configurações → Chaves SSH).

  1. In the project, click New service → App (Novo serviço → App) and choose Git.
  2. Choose the repository and the branch (e.g. main).
  3. Choose how to build:
    • Dockerfile — the repository already has a Dockerfile;
    • Railpack — the panel figures out the language on its own and builds the image (Node, Python, Go, PHP, Ruby, Java…);
    • Static site (Site estático) — ready-made HTML or HTML generated by a command (e.g. npm run build).
  4. Enter the port the app listens on, if it is not a static site.
  5. Click Create and deploy (Criar e implantar).

The build log shows up live. When it finishes, connect a domain.

In the service’s Advanced (Avançado) tab, turn on automatic deploys (deploy automático). The panel shows the webhook address to paste into the repository (GitHub: Settings → Webhooks). On every push to the chosen branch, a new deployment starts on its own.

In repositories with several apps, enter the service’s watched paths (caminhos vigiados): a push that does not touch them does not trigger a deployment.

Turn on previews and each pull request gets a test version with its own address (pr-12.<domínio base>). A new commit on the PR redeploys it; a closed PR deletes the preview. See Previews.