Skip to main content
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 running docker 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 internal source 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:create permission
  • User cannot access the specified environment

500 Internal Server Error

  • Docker daemon error
  • File system error
  • Database error

Permissions

Requires stacks:create permission for the specified environment.