OPC # 0002: Improvements to Client provisioning workflows

This commit is contained in:
amadzarak
2026-04-25 21:58:44 -04:00
parent 378daf98d6
commit e340b42223
3 changed files with 58 additions and 7 deletions
+12
View File
@@ -44,6 +44,18 @@ export function streamComposeForceUp(onLine: (line: string) => void, onDone: ()
return src;
}
/**
* Nuke & Recreate — force-removes every known platform container by name first
* (kills orphans that --remove-orphans won't touch), then runs compose up fresh.
* Use this when Force Recreate still fails with "container name already in use".
*/
export function streamComposeNuke(onLine: (line: string) => void, onDone: () => void): EventSource {
const src = new EventSource(`${BASE_URL}/api/infra/compose/nuke/stream`);
src.onmessage = (e) => onLine(e.data);
src.onerror = () => { onDone(); src.close(); };
return src;
}
export function streamComposeDown(onLine: (line: string) => void, onDone: () => void): EventSource {
const src = new EventSource(`${BASE_URL}/api/infra/compose/down/stream`);
src.onmessage = (e) => onLine(e.data);