Deploy a custom (non-catalog) app
Creates a custom deployment. Source mode is auto-detected from which body fields are populated — pick exactly one:
-
Image — set image to a public registry reference. Agent does docker pull + docker run.
{ "name": "my-nginx", "agent_id": "agt_...", "image": "nginx:alpine", "target_port": 80, "domain": "static.example.com" } -
Dockerfile via tarball — first POST /platform/deployments/custom/contexts with a gzip tarball of your project, then reference the returned context_id here.
{ "name": "my-app", "agent_id": "agt_...", "context_id": "ctx_...", "dockerfile_path": "Dockerfile", "target_port": 8080, "cpus": 1.0, "memory_mb": 512, "domain": "myapp.example.com" } -
Dockerfile via git URL — point at a git repo (public or private); the agent shallow-clones at deploy time. Private repos set git_auth_method: deploy_key (SSH URL + a generated deploy key whose public half is returned for you to add to the repo — works with GitHub, GitLab, Bitbucket, Gitea or self-hosted) or pat (https URL + a token in git_pat — GitHub or GitLab; for Bitbucket use deploy_key). Public repos on any host need no auth (git_auth_method defaults to none).
{ "name": "my-app", "agent_id": "agt_...", "git_url": "https://github.com/you/your-repo", "git_ref": "main", "dockerfile_path": "Dockerfile", "target_port": 8080, "domain": "myapp.example.com" }{ "name": "my-app", "agent_id": "agt_...", "git_url": "git@github.com:you/private-repo.git", "git_ref": "main", "git_auth_method": "deploy_key", "target_port": 8080 } -
Manifest — full docker-compose YAML, treated like a catalog deploy. cpus/memory_mb are ignored in this mode — use compose's cpus: / mem_limit: per service.
{ "name": "my-app", "agent_id": "agt_...", "manifest": { "runtime": { "type": "docker-compose", "compose_yaml": "..." } }, "domain": "myapp.example.com" }Routing contract (manifest mode only): when your routes use the standard {deployment_id}-<suffix>:<port> upstream pattern, the matching service in compose_yaml MUST declare container_name: ${DEPLOYMENT_ID}-<suffix>. Without it, Docker Compose auto-generates names like app-1 that the reverse proxy can't resolve, and every HTTPS request returns 502. The server rejects manifests that violate this contract with 400 INVALID_REQUEST at create time. See the llms-full.txt doc for full examples.
-
Compose import — review compose_yaml with POST /platform/deployments/custom/compose/prepare, explicitly select web_service and target_port, then send the returned analysis_id as compose_review_id alongside the same YAML and selection. The supported public-image subset becomes a frozen manifest; service names, local volumes and HTTP routing are managed by the platform. See https://docs.imprezahost.com/compose-import.html for limits.
name is per-account unique (3–100 chars matching ^[a-z0-9][a-z0-9_-]{1,98}[a-z0-9]$).
For deploys created with git_url, see /platform/deployments/custom/{id}/git-webhook/* to wire up auto-redeploy on push.
Request
- Base URL: https://api.imprezahost.com/v1
- URL: https://api.imprezahost.com/v1/platform/deployments/custom
- Auth: API key in header X-API-Key and API key in header X-API-Secret
Request body
Example request
{
"name": "my-app",
"agent_id": "agt_4bcbffef132a2089",
"domain": "myapp.example.com",
"context_id": "ctx_a1b2c3d4e5f6",
"git_url": "https://github.com/you/your-repo"
}Response
Custom deployment enqueued
Changes
No recorded changes to this operation across all 1 revision of this API.