Native desktop installer (Electron) for Windows, macOS, and Linux#495
Open
Papyszoo wants to merge 6 commits into
Open
Native desktop installer (Electron) for Windows, macOS, and Linux#495Papyszoo wants to merge 6 commits into
Papyszoo wants to merge 6 commits into
Conversation
Add DISABLE_HTTPS_LISTENER + HTTP_PORT so the WebApi can run plain HTTP behind the native launcher's edge server, and make the WebDAV probe base URL overridable via WEBDAV_PROBE_BASE_URL so the same probe works in Docker (nginx) and native (edge server) modes.
ENABLE_GPU_RENDERING swaps swiftshader for real GPU Chromium flags so the native launcher can opt thumbnail workers into GPU rendering on machines that support it. Default behaviour (software rendering) is unchanged.
Introduce src/desktop/ — an Electron launcher that bundles the frontend, WebApi (self-contained .NET publish), asset processor, Node runtime, and PostgreSQL into a single installable app. Components: - ProcessManager — boots PostgreSQL, WebApi, and N worker processes in order; restarts workers on unexpected exit. - EdgeServer — Express reverse proxy on the public app port, terminates /api/native/runtime locally and proxies the rest to WebApi/WebDAV. - runtimeConfig — sanitised JSON config persisted in userData with port/worker/GPU settings. - prepare-bundle script — stages the runtime tree consumed by electron-builder. Startup shows a loading screen until the backend health-checks pass; EADDRINUSE on the app port surfaces a friendly message; window-all-closed follows the platform convention (stay alive on macOS). Root package.json gains stage:desktop and build:desktop scripts.
When the WebApi exposes /api/native/runtime (only in native installs), Settings shows a "Native Runtime" accordion section to configure the app port, worker process count, jobs-per-worker, and hardware acceleration. Port changes flag a restart-required hint; worker changes apply immediately. Existing WebDAV help text now branches on whether a native runtime is detected so Docker users keep their .env guidance.
Adds the Native Installers workflow: - build-installers job — stages the runtime, dotnet publishes the WebApi per-RID, installs PostgreSQL via the platform package manager, and produces .exe / .dmg / .AppImage+.deb via electron-builder. - test-installers job — downloads the built artifact, installs silently, starts the app (xvfb on Linux), waits for the HTTP server on port 3010, exercises /, /api/native/runtime, and /api/health, then uninstalls and asserts that the app binary is gone and userData survives. macOS target is Apple Silicon (macos-14, osx-arm64, electronArch arm64). Artifacts are uploaded on every run so the test job can consume them.
README and the docs site now describe the native installer path (Windows/macOS/Linux) next to the existing Docker quick start, point users at Settings > Native Runtime for port and worker tuning, and clarify which deployment path uses .env vs the in-app config.
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.
Summary
Ships a native installer track for Modelibr alongside the existing Docker setup. Non-technical users can download a
.exe/.dmg/.AppImagefrom GitHub Releases, install it, and run a fully self-contained Modelibr — bundled frontend, WebApi, asset processor workers, Node runtime, and PostgreSQL — without touching Docker or.envfiles.What's in this PR
Backend wiring
Desktop launcher (`src/desktop/`)
Frontend
CI (`.github/workflows/native-release.yml`)
Docs
Test plan
Follow-ups (intentionally not in this PR)