Skip to content

feat(compose): add Docker Compose stack management#41

Open
dviejokfs wants to merge 1 commit intomainfrom
feat/compose-stacks
Open

feat(compose): add Docker Compose stack management#41
dviejokfs wants to merge 1 commit intomainfrom
feat/compose-stacks

Conversation

@dviejokfs
Copy link
Contributor

Summary

  • Adds a new Stacks feature for managing standalone Docker Compose stacks, separate from Temps projects
  • New temps-compose crate with full three-layer architecture (handlers, services, entities)
  • Frontend page with create/edit dialogs, YAML editor, and lifecycle controls (deploy, stop, restart)
  • Lightweight Dockge/Portainer-style interface built directly into Temps — no extra tools needed

What's included

Backend

  • temps-compose crate: service, handlers, plugin, error types, audit events
  • compose_stacks database migration (id, name, description, compose_content, env_content, node_id, state)
  • REST API: GET/POST /stacks, GET/PATCH/DELETE /stacks/{id}, POST /stacks/{id}/{deploy,stop,restart,pull}
  • New permissions: StacksRead, StacksWrite, StacksDelete, StacksCreate (added to Admin, User, Reader roles)
  • Audit logging for create, update, delete, and state change operations
  • 8 unit tests

Frontend

  • New "Stacks" sidebar item with Layers icon
  • List view with state badges, responsive table
  • Create dialog with YAML editor for compose content and .env variables
  • Edit dialog for updating stack configuration
  • Lifecycle dropdown: Deploy, Stop, Restart, Delete

Test plan

  • cargo check --bin temps passes
  • cargo test --lib -p temps-compose — 8 tests pass
  • Clippy clean
  • Manual test: create stack via API
  • Manual test: verify frontend page renders
  • Manual test: lifecycle operations (deploy/stop/restart)

Adds a new "Stacks" feature for managing standalone Docker Compose stacks
separate from projects — a lightweight Dockge/Portainer-style interface
built into Temps.

Backend:
- New `temps-compose` crate with full three-layer architecture
- Database migration for `compose_stacks` table
- CRUD API endpoints + lifecycle controls (deploy, stop, restart, pull)
- Stacks permissions (StacksRead, StacksWrite, StacksDelete, StacksCreate)
- Audit logging for all write operations
- 8 unit tests covering service layer

Frontend:
- New "Stacks" sidebar entry with Layers icon
- Stacks list page with create/edit dialogs
- YAML editor for compose content and .env variables
- Lifecycle controls (deploy, stop, restart) via dropdown menu
- State badges and responsive table layout

Plugin:
- ComposePlugin registered in server startup
- OpenAPI schema integration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant