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
- Go to Servers → open the server → Apps tab → + Create App.
- Select Compose App → From Git Repository.
- Fill in the form:
| Field | Description |
|---|---|
| App name | Internal label |
| Git account | Select the connected git provider |
| Repository URL | SSH or HTTPS URL of the repo |
| Branch | Branch to deploy from (e.g., main) |
| Compose file path | Path to the compose file in the repo (default: docker-compose.yml) |
| Port mappings | Same as YAML compose — specify per-service ports |
| Environment variables | Additional env vars injected at deploy time |
- Toggle Deploy now ON.
- Click Create.
How Deployments Work
When you deploy:
- CloudAIPilot SSH-es to the server.
- Runs
git pull(orgit cloneon first deploy). - Runs
docker compose pullto update images if needed. - Runs
docker compose up -dwith 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 .
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
| Issue | Likely cause | Fix |
|---|---|---|
| "Permission denied (publickey)" | Deploy key not added | See KB-04-05: Connect Git Provider. |
| Compose file not found | Wrong path in the field | Check the exact path in your repo and update the field. |
| Services fail to start | Missing env vars or image pull error | Check logs — see KB-04-12: App Logs. |
Related Articles
- KB-04-03: Create a Compose App from YAML
- KB-04-05: Connect a Git Provider
- KB-04-06: Build and Deploy from Git