Knowledge
Search knowledge... ⌘K
Knowledge · Guidelines · docker
Compose From Git
How to configure Dokploy compose projects from Git repos
Metadata
docker docker mandatory
Procedures
Showing 3 of 6
- 1 Create Dokploy project
Use project.create API to create a named project that groups related compose services
curl -X POST https://dokploy.shredbx.com/api/project.create \ -H "Authorization: Bearer $DOKPLOY_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "sbx", "description": "SBX workspace platform"}' - 2 Create compose service
Use compose.create within the project's default environment to register a compose deployment unit
curl -X POST https://dokploy.shredbx.com/api/compose.create \ -H "Authorization: Bearer $DOKPLOY_TOKEN" \ -H "Content-Type: application/json" \ -d '{"projectId": "<project-id>", "name": "sbx-compose"}' - 3 Configure compose source
Use compose.update to set sourceType='raw' and paste docker-compose.prod.yml content, OR set sourceType='git' with repo URL, branch, and compose path
# Option A: Raw compose content curl -X POST https://dokploy.shredbx.com/api/compose.update \ -H "Authorization: Bearer $DOKPLOY_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "composeId": "<compose-id>", "sourceType": "raw", "composePath": "./docker-compose.prod.yml" }' # Option B: Git source (preferred) curl -X POST https://dokploy.shredbx.com/api/compose.update \ -H "Authorization: Bearer $DOKPLOY_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "composeId": "<compose-id>", "sourceType": "git", "repository": "https://github.com/org/repo.git", "branch": "main", "composePath": "./docker-compose.prod.yml" }'
Tools
- Dokploy API
- docker compose