Ephemeral Sandbox Orchestration System#628
Open
deslawson wants to merge 1 commit into
Open
Conversation
Implemented per-user Docker-based sandbox instances with full lifecycle management. The system provisions isolated containers on demand via the Docker API, pre-seeds them with test data (5 plans, 10 subscribers, 20 invoices), and auto-cleans up after a configurable TTL (1h default, extendable to 4h). Key components: containerManager.ts orchestrates Docker Compose stacks with resource limits (512MB RAM, 1 CPU, 2GB disk); CleanupWorker runs a cron loop checking for idle timeouts (30min) and TTL expiry; sandboxLifecycleController.ts exposes REST endpoints for provision, teardown, TTL extension, and idle-timer reset; SandboxManagementPage.tsx provides the developer-portal UI with provision button, per-sandbox cards, and extend/destroy controls; seed.sql auto-initializes the database with realistic test data; and Stellar friendbot funding runs automatically on provision. Edge cases handled: max 3 concurrent sandboxes (returns 429 with wait estimate), single 2h TTL extension cap, and idle timeout warnings. closes Smartdevs17#583
|
@deslawson Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implemented per-user Docker-based sandbox instances with full lifecycle management. The system provisions isolated containers on demand via the Docker API, pre-seeds them with test data (5 plans, 10 subscribers, 20 invoices), and auto-cleans up after a configurable TTL (1h default, extendable to 4h). Key components: containerManager.ts orchestrates Docker Compose stacks with resource limits (512MB RAM, 1 CPU, 2GB disk); CleanupWorker runs a cron loop checking for idle timeouts (30min) and TTL expiry; sandboxLifecycleController.ts exposes REST endpoints for provision, teardown, TTL extension, and idle-timer reset; SandboxManagementPage.tsx provides the developer-portal UI with provision button, per-sandbox cards, and extend/destroy controls; seed.sql auto-initializes the database with realistic test data; and Stellar friendbot funding runs automatically on provision. Edge cases handled: max 3 concurrent sandboxes (returns 429 with wait estimate), single 2h TTL extension cap, and idle timeout warnings.
Pull Request Checklist
Quality Gates (All must pass before merge)
Additional Requirements
Reviewers
This PR will not be mergeable until all quality gates pass.
closes #583