mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-10-28 07:41:27 +00:00
feat(preview): real preview environments — clone, deploy, TTL, promote (#67)
Preview environments were bookkeeping only: a fabricated deployment row marked "running" and a fake *.preview.containr.local URL. Now a preview is a real service clone — full config copy (source, env, volumes, access), git_branch pinned to the requested branch, its own preview hostname under the clone's node default domain, and a real deployment through the queue. - cloneServiceRow extracted from handleCloneService for reuse - preview_environments.preview_service_id links to the clone - minute sweeper: expires past-TTL previews (removes clone runtime + row) and syncs preview status from the clone's live service status - delete/cleanup paths tear the clone down, not just the row - promote redeploys the SOURCE service at the preview branch and retires the clone — a real deployment, not a pending stub Verified live: create → clone → deploy → running container; TTL expiry → clone + container gone; promote → real deploy on the source, preview stopped. Unit test covers the DNS-safe clone naming. Generated with [Devin](https://devin.ai) Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
d5909172ae
commit
dd7b735b38
8 files changed
+397
-122
No files matched your search
@@ -9564,6 +9564,10 @@ components:
|
||||
service_id:
|
||||
type: string
|
||||
format: uuid
|
||||
preview_service_id:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The cloned service the preview actually deploys; its live status drives the preview status.
|
||||
branch_name:
|
||||
type: string
|
||||
pr_number:
|
||||
|
||||
Reference in new issue
Block a user