Phase 25: templates as stack folders (0.31.0)
Templates are now stack-shaped folders (compose.yaml + .env.example +
template.json) instead of DB rows + manifest.json + {{VAR}} rendering.
Pull copies the folder into a new stack; custom templates persist under
DATA_DIR/templates. Adds POST /api/templates/from-stack and a one-time
startup migration for pre-0.31 DB templates (drops the template table).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
34cb215266
commit
1609b8bcc3
+18
@@ -208,6 +208,24 @@ RemoteStackDetail** (not the new-stack editor, which has no dir yet).
|
||||
|
||||
---
|
||||
|
||||
## Phase 25 — Templates as stack folders ☑ DONE — shipped 0.31.0
|
||||
|
||||
Templates reworked from DB rows + `manifest.json` + `{{VAR}}` mustache rendering
|
||||
to **stack-shaped folders**: `backend/templates/<slug>/` with `compose.yaml`,
|
||||
optional `.env.example` and a `template.json` (name/description/tags/gpu).
|
||||
"Pull" copies the whole folder into a new stack (`.env.example` → `.env`);
|
||||
custom templates live under `${DATA_DIR}/templates/` and are written by
|
||||
"Save as template" (stack detail) or the manual save endpoint.
|
||||
|
||||
- Backend: `template_service` rewritten (folder scan, traversal-guarded resolve,
|
||||
`copy_into_stack`, `save_from_stack`); `Template` DB table dropped with a
|
||||
one-time startup migration (`{{VAR}}` → `${VAR}`, vars → `.env.example`).
|
||||
- API: `POST /api/templates/from-stack` new; instantiate no longer takes `values`.
|
||||
- Frontend: Templates page shows compose/env preview + file list, delete for
|
||||
custom templates; StackDetail gains "Save as template".
|
||||
|
||||
---
|
||||
|
||||
## After 23
|
||||
Remaining un-built ideas from the gap analysis (not chosen this round):
|
||||
Health-monitoring & alerting (Docker-events → notify; note `/ws/events` already
|
||||
|
||||
Reference in New Issue
Block a user