WhyGraph 2.1.0¶
Unreleased draft
2.1.0 is not released yet. This page describes the change on its way and may move until the release is tagged.
2.1.0 moves the portal's own database - the project list, settings, encrypted keys and scan history -
from a SQLite file to Postgres, so that the production mode on the roadmap runs on
the same database as your laptop. Nothing you do in the portal changes: the same pages, the same
projects, the same MCP endpoints. Your repositories are not touched; each project's
.whygraph/whygraph.db and .codegraph/ stay SQLite, in the repository.
Upgrade note¶
Re-run the installer, then whygraph up. On that first start:
whygraph upstarts a second container,whygraph-portal-postgres, beside the portal and waits for it to be ready.
What's new¶
- A database container.
whygraph-portal-postgrespublishes no port; only the portal reaches it, over its private Docker network. Its files are inpostgres/in the data directory, owned by you, and its password is a generated0600file there, never an environment value.whygraph downstops both containers, andwhygraph statusreports both (and exits non-zero unless both run). whygraph backup. Dumps the portal database intobackups/in the data directory, keeping the newest 10.whygraph upmakes the same dump automatically before it recreates a running database container (WHYGRAPH_SKIP_BACKUP=1skips it). See Backup and restore, and back upsecret.keywith the dumps.- One portal per database. Beside the existing lock on its data directory, the portal holds a lock on its database, so a second portal pointed at the same database starts degraded instead of running alongside the first.
- Safer start order.
whygraph upwaits for the database's health check before starting the portal, and a portal that cannot reach its database within a minute exits so Docker retries it. WHYGRAPH_POSTGRES_IMAGEoverrides the pinned Postgres image for a registry mirror; see Configuration.
Footprint¶
The database container uses about 30 MiB of RAM when idle, and the first whygraph up pulls the
postgres image from Docker Hub once. On a network that blocks Docker Hub, point
WHYGRAPH_POSTGRES_IMAGE at a mirror of the same image.
For developers¶
uv run pytestneeds Docker (it starts a throwaway Postgres) orWHYGRAPH_TEST_DATABASE_URL.make dev-localruns againstmake dev-db, a dev Postgres on127.0.0.1:55432.
See Developing WhyGraph.