Stack Management
Deploy Stack
Create and deploy a new compose stack
POST
Query Parameters
string
required
Environment ID where the stack will be deployed
Body Parameters
string
required
Stack name (must be unique within the environment)
string
required
Docker Compose file content (YAML)
boolean
default:true
Whether to start the stack immediately. If
false, only creates the compose file without deploying.array
Environment variables for the stack
string
Raw .env file content (non-secrets with comments preserved)
string
Custom path for the compose file (for adopted stacks)
string
Custom path for the .env file (for adopted stacks)
Response
This endpoint uses Server-Sent Events (SSE) to stream deployment progress.boolean
Whether the deployment succeeded
boolean
Whether the stack was started (always
true if start was true)string
Docker Compose output from the deployment
string
Error message if deployment failed
Behavior
- If
start=false, only creates the compose and env files without runningdocker compose up - Secrets (variables with
isSecret=true) are stored in the database and injected at runtime - Non-secret variables are written to the .env file
- The stack is marked as
internalsource type in the database - Deployment uses SSE to keep the connection alive during long operations
Compose File Example
compose.yaml
Error Responses
400 Bad Request
- Stack name is missing or invalid
- Compose file content is missing or invalid
- Invalid YAML syntax
403 Forbidden
- User lacks
stacks:createpermission - User cannot access the specified environment
500 Internal Server Error
- Docker daemon error
- File system error
- Database error
Permissions
Requiresstacks:create permission for the specified environment.