-
Notifications
You must be signed in to change notification settings - Fork 495
Open
Description
Feature Area
UI/UX (User Interface)
Priority
Nice to have
Problem Statement
Running the server in Docker is recommended for security, but the Electron app built with npm run build:electron always bundles and starts an internal server. There's no way to build a production Electron app that connects to an external server (Docker, remote host, etc.).
Proposed Solution
Add build-time configuration to create standalone Electron builds:
- Add STANDALONE_UI environment variable support to prepare-server.mjs to skip server bundling
- Add STANDALONE_UI_BUILD constant to main.ts that gets set at build time
- Add dedicated npm scripts: build:electron:standalone, build:electron:standalone:mac, etc.
When built in standalone mode:
- Server is not bundled (smaller app size)
- App connects to external server at default port 3008
- Server URL configurable via VITE_SERVER_URL at build time
Alternatives Considered
- Runtime SKIP_EMBEDDED_SERVER=true - Already works in the current codebase, but requires launching from terminal and still bundles the unused server code
- UI-based server selection - More flexible but higher implementation effort; could be a follow-up enhancement
Use Cases
No response
Mockups/Screenshots
No response
Additional Context
Development mode already supports this flexibility via environment variables. The production build should expose the same capability. This enables distributing a lightweight Electron UI while running the server in Docker for better isolation and security.
Checklist
- I have searched existing issues to ensure this feature hasn't been requested already
- I have provided a clear description of the problem and proposed solution
Metadata
Metadata
Assignees
Labels
No labels