Deploy/binary release#58
Merged
Merged
Conversation
- Add init_database_url to set DB URL via CLI - Update establish_connection to use env vars if URL not set - Ensure proper connection for standalone binary execution
- Add Cli struct using clap::Parser for command-line args - Support database_url, address, and optional port - Implement helper database_url() to fallback to env var
- Parse and validate address with fallback to localhost - Default port to 8000 when not provided - Merge address and port into Rocket config - Add startup log for clarity
- Parse CLI arguments using clap - Initialize database URL for connection setup - Launch Rocket instance with configured CLI options
- Initialize dotenv for environment variables - Parse CLI options for configuration - Initialize database URL before Rocket startup - Launch Rocket server asynchronously
- Parse CLI for address and port configuration - Serve static files from ui-dist directory using Rocket FileServer - Default port set to 3000 for frontend - Log server address and port on startup
- Include stable mork-server binary under api/mork-bin for distribution - Exclude from build process since it’s precompiled - Ensure binary is committed for inclusion in release artifacts
…dling - Run npm install and npm run build for frontend during cargo build - Copy compiled dist output into api/ui-dist directory - Ensure ui-dist is always refreshed for accurate packaging - Improves automation for unified binary and frontend builds
- Adjust rootNodes and ref props for SpaceGraph component - Ensure canvasHandle correctly receives and sets elements - Resolves build errors in frontend Load.tsx file
…aries - set build.rs for frontend build - mark package as preferred for cargo-dist - add packages and dependecies for this binary work
- define workspace members and targets - configure shell installer and release updater - add mork-server as extra artifact for distribution
- plan and build local and global artifacts - handle publishing and GitHub release creation - cache dist and manage scratch storage for artifacts
- Introduced CLI args with sensible defaults for all service URLs. - Improves configurability without needing hardcoded endpoints.
…-dist via FileServer - Extracted IP and port dynamically from mettakg_api_url argument. - Mounted ui-dist folder to serve frontend assets directly.
…inary architecture - Deleted api.rs and frontend.rs under src/bin to unify server entrypoint. - Simplified build structure for easier release and maintenance.
…awned within metta-kg binary - Removed redundant mork-server artifact from dist-workspace.toml. - Transitioned to internal binary spawning for release workflow.
- Adjusted Cargo configuration for a single combined binary release. - Prepared workspace for simplified binary management.
Deploy/single binary
Fix/single binary
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.
Description
This pull request introduces significant improvements to the build, packaging, and configuration of the MeTTa-KG project, with a focus on supporting multiple database backends, automating frontend and binary asset integration, and enhancing release workflows. The most important changes are grouped below.
Build and Release Automation:
.github/workflows/release.ymlto automate building, packaging, and releasing usingcargo-dist, supporting multi-platform builds and GitHub Releases..github/workflows/mork-upload.ymlto build and upload MORK server binaries for release, including artifact staging and publishing to GitHub.Project Structure and Asset Management:
apitometta-kg, updated metadata, added a custombuild.rsto automate frontend build (using pnpm) and download the MORK server binary during build, ensuring required assets are present. [1] [2]Database Backend Support:
Cargo.tomlto support both SQLite and PostgreSQL via feature flags, added relevant dependencies, and split migrations into backend-specific directories. [1] [2]up.sql), teardown (down.sql), and initial data seed (up.sql/down.sql). [1] [2] [3] [4]tokenstable.CLI Improvements:
src/cli.rsusingclap, allowing configuration of database URLs and service endpoints.Type of Change
Checklist