mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 08:33:36 +00:00
feat: add support for external server mode with Docker integration
- Introduced a new `docker-compose.dev-server.yml` for running the backend API in a container, enabling local Electron to connect to it. - Updated `dev.mjs` to include a new option for launching the Docker server container. - Enhanced the UI application to support external server mode, allowing session-based authentication and adjusting routing logic accordingly. - Added utility functions to check and cache the external server mode status for improved performance. - Updated various components to handle authentication and routing based on the server mode.
This commit is contained in:
9
dev.mjs
9
dev.mjs
@@ -27,6 +27,7 @@ import {
|
||||
ensureDependencies,
|
||||
prompt,
|
||||
launchDockerDevContainers,
|
||||
launchDockerDevServerContainer,
|
||||
} from './scripts/launcher-utils.mjs';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
@@ -96,7 +97,7 @@ async function main() {
|
||||
|
||||
// Prompt for choice
|
||||
while (true) {
|
||||
const choice = await prompt('Enter your choice (1, 2, or 3): ');
|
||||
const choice = await prompt('Enter your choice (1, 2, 3, or 4): ');
|
||||
|
||||
if (choice === '1') {
|
||||
console.log('');
|
||||
@@ -172,8 +173,12 @@ async function main() {
|
||||
console.log('');
|
||||
await launchDockerDevContainers({ baseDir: __dirname, processes });
|
||||
break;
|
||||
} else if (choice === '4') {
|
||||
console.log('');
|
||||
await launchDockerDevServerContainer({ baseDir: __dirname, processes });
|
||||
break;
|
||||
} else {
|
||||
log('Invalid choice. Please enter 1, 2, or 3.', 'red');
|
||||
log('Invalid choice. Please enter 1, 2, 3, or 4.', 'red');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user