跳至主要内容

Container Stack Management

Overview

A Container Stack is a Docker Compose-based application definition stored in WEDA Core. It represents a multi-container workload — one or more services defined in a Docker Compose file — that can be deployed to any number of WEDA Nodes.

Every change to a Container Stack produces a new revision: an immutable, versioned snapshot of its Compose content, environment values, and description. Revisions accumulate over time, allowing you to:

  • Deploy specific versions to different device groups
  • Compare any two revisions (field-level diff)
  • Roll back by redeploying an older revision

Active deployments are not affected when you update a stack — devices continue running their deployed revision until explicitly redeployed.

備註

WEDA supports Docker Compose format only. Helm Chart format is not supported.

Operations

Stack Configuration

OperationAPIDescription
Create StackPOST /api/v1/orgs/{orgId}/stack-configsCreate a new Container Stack (creates revision 1 automatically)
List StacksGET /api/v1/orgs/{orgId}/stack-configsList all Container Stacks in an Org
Get StackGET /api/v1/orgs/{orgId}/stack-configs/{stackConfigId}Get the latest configuration of a stack
Update StackPATCH /api/v1/orgs/{orgId}/stack-configs/{stackConfigId}Update the compose file (creates a new revision automatically)
Delete StackDELETE /api/v1/orgs/{orgId}/stack-configs/{stackConfigId}Delete a stack and all its revisions

Revision Management

OperationAPIDescription
List RevisionsGET /api/v1/orgs/{orgId}/stack-configs/{stackConfigId}/revisionsList all revisions of a stack
Get RevisionGET /api/v1/orgs/{orgId}/stack-configs/{stackConfigId}/revisions/{stackRevisionId}Get details of a specific revision
Compare RevisionsGET /api/v1/orgs/{orgId}/stack-configs/revisions/diff?sourceStackRevisionId={id1}&targetStackRevisionId={id2}Field-level diff between any two revisions
Delete RevisionDELETE /api/v1/orgs/{orgId}/stack-configs/{stackConfigId}/revisions/{stackRevisionId}Delete a specific revision

Constraints

  • stackName is required and must be unique within the Org
  • stackName has a maximum length of 63 characters and may contain only lowercase letters, digits, and hyphens (-)
  • stackName must start and end with a letter or digit and cannot contain consecutive hyphens (--)
  • type must be compose
  • composeFileContent must be base64-encoded valid Docker Compose YAML
  • environment is optional and provides values that the Compose file can reference using ${VARIABLE_NAME}
  • description is optional and has a maximum length of 1024 characters
  • Updating a stack does not affect devices running an older revision — they must be explicitly redeployed
  • A revision cannot be deleted while it is associated with an existing deployment. Undeploy it from all devices before deleting the revision

Examples of Stack names:

  • Valid: factory-monitor-01
  • Invalid: Factory_Monitor (uppercase letters and underscores are not allowed)
  • Invalid: factory--monitor (consecutive hyphens are not allowed)
  • Invalid: -factory-monitor (a name cannot start with a hyphen)

Scenario

A developer creates a monitoring stack and updates it to add a sidecar service:


Last updated on Jul-16, 2026 | Version 1.1.0