feat(saas): SaaS database migration - PostgreSQL backend + visualizat…#303
Open
LinShiG0ng wants to merge 3 commits intovolcengine:mainfrom
Open
feat(saas): SaaS database migration - PostgreSQL backend + visualizat…#303LinShiG0ng wants to merge 3 commits intovolcengine:mainfrom
LinShiG0ng wants to merge 3 commits intovolcengine:mainfrom
Conversation
…ion dashboard ## Changes ### New PostgreSQL + pgvector Storage Backend - `openviking/storage/postgresql_backend.py`: Full implementation of VikingDBInterface using asyncpg + PostgreSQL pgvector extension. Supports all CRUD, vector similarity search, scalar filter DSL translation to SQL, scroll pagination, and batch operations. - `openviking/storage/postgresql_manager.py`: Manager wrapper with queue injection interface matching VikingDBManager, enabling transparent swap in OpenVikingService. ### Configuration - `openviking_cli/utils/config/vectordb_config.py`: Added `postgresql` backend type and PostgreSQLConfig model (host/port/db/user/password/dsn). - `pyproject.toml`: Added asyncpg>=0.29.0 dependency. ### Service Integration - `openviking/service/core.py`: Auto-selects PostgreSQLManager when vectordb.backend == 'postgresql', falls back to local VikingDBManager. ### SaaS Deployment - `docker-compose.saas.yml`: Full SaaS stack with PostgreSQL+pgvector, MinIO (S3-compatible AGFS backend), and OpenViking server. - `ov.conf.saas.example`: Reference SaaS configuration template. ### Visualization Dashboard - `openviking/server/routers/dashboard.py`: Single-page HTML dashboard served at GET /dashboard with dark-themed UI, context browser, semantic search, resource ingestion, and session viewing. - `openviking/server/routers/debug.py`: Added GET /api/v1/debug/storage/stats and GET /api/v1/debug/storage/list endpoints for dashboard use. - `openviking/server/app.py` + routers/__init__.py: Register dashboard router. https://claude.ai/code/session_01XUxVTAos6k6N3idBx2a7kP
Comprehensive Chinese-language guide covering: - Architecture overview (PostgreSQL+pgvector vs MinIO vs local) - Docker Compose quick start (5 steps) - Full ov.conf.saas configuration reference with inline comments - Deployment verification (health check, storage stats, MinIO console) - Visual dashboard usage guide (all 6 tabs documented) - REST API reference with curl examples - Local development mode (without Docker) - Production hardening (passwords, API keys, CORS, real S3) - Troubleshooting (common errors, PostgreSQL inspection queries) https://claude.ai/code/session_01XUxVTAos6k6N3idBx2a7kP
|
|
…a-only compose
Problem:
ghcr.io/volcengine/openviking:main is a private image that cannot be
pulled without authentication, causing 'unauthorized' errors on
docker compose up.
Changes:
docker-compose.saas.yml
- Replace `image: ghcr.io/volcengine/openviking:main` with
`build: .` + `image: openviking:saas-local` so the image is
built from the local Dockerfile on first run.
- Update `start_period` to 60s to accommodate build time.
- Add explanatory comments about first-build duration.
docker-compose.infra.yml (new)
- Minimal compose for PostgreSQL+pgvector and MinIO only.
- Intended for local development: start infra with Docker,
run openviking-server directly on the host machine.
- No image build required; starts in ~20 seconds.
ov.conf.local.example (new)
- Companion config for docker-compose.infra.yml.
- Uses localhost for postgres/minio endpoints instead of
Docker container names.
SAAS_DEPLOYMENT.md
- Section 3 rewritten with two deployment options:
A) Full Docker (build from source, ~10-30 min first time)
B) Infra-only Docker + local server (fast, recommended for dev)
- Windows PowerShell commands added.
- First-build duration warning added.
https://claude.ai/code/session_01XUxVTAos6k6N3idBx2a7kP
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.
…ion dashboard
Changes
New PostgreSQL + pgvector Storage Backend
openviking/storage/postgresql_backend.py: Full implementation of VikingDBInterface using asyncpg + PostgreSQL pgvector extension. Supports all CRUD, vector similarity search, scalar filter DSL translation to SQL, scroll pagination, and batch operations.openviking/storage/postgresql_manager.py: Manager wrapper with queue injection interface matching VikingDBManager, enabling transparent swap in OpenVikingService.Configuration
openviking_cli/utils/config/vectordb_config.py: Addedpostgresqlbackend type and PostgreSQLConfig model (host/port/db/user/password/dsn).pyproject.toml: Added asyncpg>=0.29.0 dependency.Service Integration
openviking/service/core.py: Auto-selects PostgreSQLManager when vectordb.backend == 'postgresql', falls back to local VikingDBManager.SaaS Deployment
docker-compose.saas.yml: Full SaaS stack with PostgreSQL+pgvector, MinIO (S3-compatible AGFS backend), and OpenViking server.ov.conf.saas.example: Reference SaaS configuration template.Visualization Dashboard
openviking/server/routers/dashboard.py: Single-page HTML dashboard served at GET /dashboard with dark-themed UI, context browser, semantic search, resource ingestion, and session viewing.openviking/server/routers/debug.py: Added GET /api/v1/debug/storage/stats and GET /api/v1/debug/storage/list endpoints for dashboard use.openviking/server/app.py+ routers/init.py: Register dashboard router.https://claude.ai/code/session_01XUxVTAos6k6N3idBx2a7kP
Description
Related Issue
Type of Change
Changes Made
Testing
Checklist
Screenshots (if applicable)
Additional Notes