DigitalOcean Deployment Support and CI/CD Enhancements#25
Draft
surafelfikru wants to merge 25 commits into
Draft
DigitalOcean Deployment Support and CI/CD Enhancements#25surafelfikru wants to merge 25 commits into
surafelfikru wants to merge 25 commits into
Conversation
- Pin time crate to version 0.3.36 to resolve MSRV conflict - Add Cargo.lock for reproducible builds - Update GitHub Actions to build both API and Mork images - Configure DigitalOcean to use pre-built images from GHCR - Remove unnecessary SSH key setup from workflow
- Change IMAGE_NAME back to use github.repository variable - Update app.yaml to pull from surafelfikru/metta-kg-api and surafelfikru/metta-kg-mork - Fixes permission denied error when pushing to qoba-ai organization
…ility - Change base image from rust:1.88 to rust:1.86 (1.88 doesn't exist) - Pin fast-slice-utils to 0.1.0 which has no rust-version requirement - Resolves MSRV conflict similar to API time crate issue
- pathmap@0.3.0 requires rust 1.88 (doesn't exist) - fast-slice-utils@0.1.2 requires rust 1.89 (doesn't exist) - Solution: Use rustlang/rust:nightly-bookworm which satisfies all requirements - Simplified Dockerfile by removing failed cargo update attempts
- PathMap master has breaking API changes in graft() method - Error: graft() expects &Z but MORK passes RZ directly - Solution: Checkout HEAD~10 to use older compatible API
- Add registry field to specify surafelfikru namespace - Add registry_credentials using DO environment variable reference - Simplify repository names to short format (metta-kg-api, metta-kg-mork) - Securely reference GHCR_TOKEN from DigitalOcean secrets This resolves the 'image reference is malformed or invalid' error by providing proper authentication credentials for pulling from GHCR.
DigitalOcean expects credentials in format 'username:${VAR}' not just '${VAR}'.
Updated registry_credentials to include username prefix as required by DO spec validation.
The images are publicly accessible, so authentication is not required. Removing registry_credentials field resolves the 'invalid token' error.
- Read POSTGRES_PORT from environment variable instead of hardcoding 5432 - Add POSTGRES_SSLMODE support (defaults to 'prefer', set to 'require' for DigitalOcean) - Update app.yaml to set POSTGRES_SSLMODE=require for managed database This fixes the connection timeout error by using the correct port (25060) and enabling SSL for DigitalOcean managed PostgreSQL database.
…ecks - Add address=0.0.0.0 and port=8000 to Rocket.toml to allow external connections - Change POSTGRES_USER from metta-kg-api to doadmin for deployment - Remove unused METTA_KG_ADDRESS and METTA_KG_PORT environment variables This fixes health check failures by allowing DigitalOcean's health probe to connect to the API service from outside the container. Previously, Rocket was listening on 127.0.0.1 (localhost only), which blocked external health check connections.
…rable Removed unused environment variables: - METTA_KG_DATABASE_URL (redundant - constructed from POSTGRES_* vars) - METTA_KG_SECRET (no JWT auth implementation) - METTA_KG_ORIGIN_URL (never used in code) - METTA_KG_ADDRESS (now configured in Rocket.toml) - METTA_KG_PORT (now configured in Rocket.toml) Added METTA_KG_FRONTEND_URL for CORS configuration: - API now reads allowed origins from environment variable - Defaults to https://metta-kg.vercel.app if not set - Always allows http://localhost:3000 for local development Updated all configuration files: - .do/app.yaml: Removed unused vars, added METTA_KG_FRONTEND_URL - .env.example: Reorganized with clear sections and comments - docker-compose.yml: Updated to match new env var structure - api/src/lib.rs: CORS now configurable via METTA_KG_FRONTEND_URL This cleanup improves maintainability and reduces confusion about which environment variables are actually used by the application.
|
@surafelfikru is attempting to deploy a commit to the timverhaegen's projects Team on Vercel. A member of the Team first needs to authorize it. |
- Add deploy.py script for automated DigitalOcean deployment - Uses uv inline dependencies (no extra config files needed) - Supports optional password setting via --postgres-password flag - Includes dry-run mode with full spec preview in less - Template validation command - Environment variable support for all arguments - Default app ID configured for convenience - Update .do/app.yaml routing from /api to / (root path) - Simplifies URL construction in frontend - Removes path prefix complexity - Update .do/README.md with automated deployment guide - Add doctl and uv installation instructions - Document deployment script usage with examples - Reorganize manual deployment as alternative option This enables one-command deployment: uv run .do/deploy.py deploy --github-owner <username>
- DigitalOcean service discovery requires http_port, not internal_ports - This fixes 'bad address' error when API tries to connect to mork - Mork remains internal-only (no routes configured)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Replace service-level routes with top-level ingress configuration - This matches DigitalOcean's current spec format and prevents deployment conflicts - Only API service is publicly accessible via ingress rules - Mork remains internal-only (no ingress rule)
c316cf6 to
37821db
Compare
- Remove stale imports (Mm2Cell, Namespace, StatusRequest, StatusResponse) that don't exist in this branch - Add missing MorkRequest trait import for .path() method calls - All 4 fixes intact: CORS config, JSON error catchers, Mork logging, proxy URL import - 55/55 tests pass
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.
Key Changes
DigitalOcean Deployment: Added
.do/app.yamltemplate and a detailedREADME.mdfor App Platform deployment.CI/CD Optimization: Updated GitHub Actions to dynamically use
github.repository_owner, allowing automated image publishing to GHCR from any fork.Backend Enhancements:
Added a
/healthendpoint for service monitoring.Standardized database environment variables (
POSTGRES_HOST,POSTGRES_SSLMODE, etc.) to support managed database connections.Dynamic CORS configuration via
METTA_KG_FRONTEND_URL.Infrastructure:
Simplified
docker-compose.ymlto use standard ports and hosts.Updated
Dockerfile.morkto use Rust nightly and fixed specific dependency branches for better stability.Static Assets: Included the compiled UI distribution (
api/ui-dist) within the backend service.