mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
feat: add Docker container launch option and update process handling
- Introduced a new option to launch the application in a Docker container (Isolated Mode) from the main menu. - Added checks for the ANTHROPIC_API_KEY environment variable to ensure proper API functionality. - Updated process management to include Docker, allowing for better cleanup and handling of spawned processes. - Enhanced user prompts and logging for improved clarity during the launch process.
This commit is contained in:
@@ -496,6 +496,7 @@ export function printModeMenu() {
|
||||
console.log('═══════════════════════════════════════════════════════');
|
||||
console.log(' 1) Web Application (Browser)');
|
||||
console.log(' 2) Desktop Application (Electron)');
|
||||
console.log(' 3) Docker Container (Isolated)');
|
||||
console.log('═══════════════════════════════════════════════════════');
|
||||
console.log('');
|
||||
}
|
||||
@@ -506,7 +507,7 @@ export function printModeMenu() {
|
||||
|
||||
/**
|
||||
* Create a cleanup handler for spawned processes
|
||||
* @param {object} processes - Object with process references {server, web, electron}
|
||||
* @param {object} processes - Object with process references {server, web, electron, docker}
|
||||
* @returns {Function} - Cleanup function
|
||||
*/
|
||||
export function createCleanupHandler(processes) {
|
||||
@@ -527,6 +528,10 @@ export function createCleanupHandler(processes) {
|
||||
killPromises.push(killProcessTree(processes.electron.pid));
|
||||
}
|
||||
|
||||
if (processes.docker && !processes.docker.killed && processes.docker.pid) {
|
||||
killPromises.push(killProcessTree(processes.docker.pid));
|
||||
}
|
||||
|
||||
await Promise.all(killPromises);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user