Create a Compose App from a Git Repo

Who this is for

Users who have their docker-compose.yml in a git repository and want CloudAIPilot to pull and deploy from git automatically.


Prerequisites

  • Server is running with Docker + Docker Compose installed.
  • You have a git repository containing a docker-compose.yml (or a custom path).
  • A git account is connected in CloudAIPilot — see KB-04-05: Connect a Git Provider.

How This Differs from YAML Entry

Instead of pasting YAML manually, CloudAIPilot clones your git repository to the server and runs docker compose up -d from the docker-compose.yml file in the repo. Updates are deployed by pulling the latest commits.


How to Create a Compose App from Git

  1. Go to Servers → open the server → Apps tab → + Create App.
  2. Select Compose AppFrom Git Repository.
  3. Fill in the form:
FieldDescription
App nameInternal label
Git accountSelect the connected git provider
Repository URLSSH or HTTPS URL of the repo
BranchBranch to deploy from (e.g., main)
Compose file pathPath to the compose file in the repo (default: docker-compose.yml)
Port mappingsSame as YAML compose — specify per-service ports
Environment variablesAdditional env vars injected at deploy time
  1. Toggle Deploy now ON.
  2. Click Create.

How Deployments Work

When you deploy:

  1. CloudAIPilot SSH-es to the server.
  2. Runs git pull (or git clone on first deploy).
  3. Runs docker compose pull to update images if needed.
  4. Runs docker compose up -d with the compose file.

For auto-deploy on push via webhook, see KB-04-06: Build and Deploy from Git.


Custom Compose File Path

If your repository has the compose file in a subdirectory (e.g., infrastructure/docker-compose.prod.yml), set the Compose file path field to that relative path. CloudAIPilot passes it as docker compose -f up -d.


What Success Looks Like

The app status shows running after the first deploy. The git repo is cloned on the server and docker compose ps shows all services up.


Common Issues and Fixes

IssueLikely causeFix
"Permission denied (publickey)"Deploy key not addedSee KB-04-05: Connect Git Provider.
Compose file not foundWrong path in the fieldCheck the exact path in your repo and update the field.
Services fail to startMissing env vars or image pull errorCheck logs — see KB-04-12: App Logs.

Related Articles