ReviewOS

stacks/ts-cloud

Support first-class Docker Compose services and one-click templates

#150
Closed chris opened this 2 months ago ·
2 months ago

Roadmap relationship

Outcome

Deploy and operate multi-service applications from Compose-compatible definitions, and offer a curated, versioned template catalog that produces inspectable configuration rather than opaque installations.

Current gap

ts-cloud can deploy sites, serverless functions, and containers, but lacks a first-class multi-service Compose model, import/conversion workflow, per-service operations, or template catalog. Complex application stacks therefore require manual infrastructure composition.

User experience

  • Create/import Compose from a repository, pasted/uploaded file, or template; preview parsed services, ports, volumes, networks, dependencies, variables, and unsupported fields before deploy.
  • Provide a topology-oriented stack overview plus per-service status, logs, shell, domains, configuration, deployments, and volumes.
  • Template cards show source/version, required inputs, architecture, minimum resources, exposed services, maintenance notes, and last verification.
  • Upgrades show a manifest/config diff and allow pinning; user changes are preserved explicitly.

Scope

  • Define a Compose application manifest with services, images/builds, commands, health checks, dependencies, networks, named volumes, secrets/configs, resource limits, restart policy, and domains.
  • Parse a documented Compose-spec subset with actionable diagnostics and an export/round-trip path.
  • Deploy to capable server/fleet drivers and map supported portions to AWS container orchestration where appropriate.
  • Support start/stop/redeploy, ordered logs, per-service shell, scale where capable, and stack-wide deletion.
  • Create a versioned template registry format, validation pipeline, health smoke tests, categories/search, and local/custom catalogs.

Technical direction

  • Keep original source plus normalized manifest and record conversion warnings.
  • Use dependency ordering and health gates without assuming depends_on implies readiness.
  • Namespace resources deterministically by project/environment/stack and preserve volume identity across releases.
  • Templates resolve to normal manifests and never bypass validation, authorization, audit, or deployment queues.

Safety and operability

  • Block privileged containers, host mounts/networking, device access, and unsafe capabilities by default; require explicit policy exceptions.
  • Never render secret values in converted files, diffs, logs, or template metadata.
  • Deletion separates stateless services from persistent volumes and requires resource-name confirmation for data removal.
  • Pin template/image versions or clearly flag floating tags.

Acceptance criteria

  • A representative web+worker+Postgres+Redis stack can be imported, previewed, deployed, observed, redeployed, and removed while preserving or explicitly deleting data.
  • Unsupported Compose keys fail or warn before provider mutation according to documented severity.
  • A template deploy produces the same editable manifest as manual creation.
  • Per-service domains, health, logs, and shell obey permissions and provider capabilities.

Verification

  • Compose parsing/round-trip fixtures, dependency/health ordering, resource naming, and destructive-volume tests.
  • Template schema, signature/source metadata, version upgrade, and smoke-test CI.
  • End-to-end multi-service deployment on at least one server driver.

Non-goals

  • Perfect compatibility with every Docker Compose extension.
  • Running arbitrary unreviewed remote template scripts with control-plane credentials.
  • Replacing Kubernetes.
8 days ago

Implemented end to end on main in small conventional commits.

Delivered:

  • a documented Compose-spec subset with Bun-native YAML parsing, normalized round-trip exports, source hashes, redacted source, actionable error/warning diagnostics, deterministic naming, dependency ordering, and health gates
  • service images/builds, commands, environment/secret references, ports, domains, networks, named volumes, dependencies, health checks, restart/resource/replica controls
  • pre-mutation blocking for privileged containers, host networking/PID/IPC/mounts, devices/capabilities/security options, path traversal, cycles, malformed routing, and literal secret-like values
  • persistent application/service desired and observed state, re-import/update behavior, resource-scoped audit events, and data-safe deletion semantics
  • durable deploy/redeploy/start/stop/scale/delete jobs, capability-aware logs/shell, server/fleet Docker Compose runtime plans, health wait, and volume preservation by default
  • pinned verified built-in templates plus checksum-validated local/custom catalogs and upgrade/user-change diff planning
  • CLI import/preview/export/diff/templates/catalog and complete lifecycle operations
  • typed API v1.5 client/OpenAPI routes with resource authorization
  • responsive topology dashboard with template cards, conversion diagnostics, service health/replicas/domains, logs/shell, scale, operations, and stronger persistent-volume confirmation
  • complete operator/developer documentation

Verification at closure:

  • real compose:templates CLI entrypoint: successful
  • CLI bundle: 262 modules, successful
  • bun test: 2,645 pass, 0 fail, 2 skip, 2 todo; 7,283 assertions across 359 files
  • bunx tsc --noEmit -p packages/ts-cloud/tsconfig.json: clean
  • dashboard SSG: 45/45 routes
  • documentation: 37 pages

Primary commits: db6e765, 423ab1f, 62d8e7e, 60e3202, 9d2098b, 934bbd3, 07f20f9.

Sign in to comment on this issue.