Repository navigation
The release for running an instance for real: backups taken while it answers, restores, a
first start in a third of the memory, a worker that holds no model between jobs, and logs that
keep nothing anybody asked. The interfaces (the HTTP API, the pack format, the database
schema) can still change before 1.0, and only the newest release gets fixes.
Before upgrading from 0.1.0:
-
Take the backup from the new checkout. 0.1.0 has no backup service, so check out
v0.2.0first and back up while 0.1.0 still runs, then start the new release:git fetch --tags git checkout v0.2.0 DPOLENS_VERSION=0.1.0 docker compose run --rm --no-deps backup docker compose pull docker compose up -d --wait
DPOLENS_VERSION=0.1.0takes the backup with the database image that is running and writes
0.1.0 into it, and--no-depsleaves the running database as it is. From 0.2.0 on,
Upgrading takes the backup first, as written. -
If
.envsetsDPOLENS_VERSION, set it to 0.2.0 or take it out: otherwise the instance
keeps running the release it names. -
No table has changed, so going back to 0.1.0 is
git checkout v0.1.0and
docker compose up -d. -
The API no longer serves
/docsand/redoc. The reference is at
https://dpolens.com/docs/api, and/openapi.jsondescribes the API to any tool. -
The API writes no access log. Each request is one
api.requestline in its JSON
output, naming the route it matched rather than the address, and the dashboard's server logs
each path without its query string. Anything that reads the old access log lines needs to
read these instead.
What changed since 0.1.0:
- Backups and restores.
docker compose run --rm backupcopies the database and the
original files into a folder of its own, with their checksums, while the instance keeps
answering, andDPOLENS_BACKUP_KEEPkeeps that many.docker compose run --rm restore
checks a backup and loads it into an instance that holds nothing yet.
(#66) dpolens --version, besidedpolens version. On a community version,dpolens init
names the laws and says that AI assistants connect with no token, and a search refused
before any law is chosen says an administrator chooses them the next time they sign in.
(#67)- The first start needs a third of the memory, and is up to five times faster. Setup
embeds the laws in batches of clauses of about one length, with as many threads as its
container may use: it peaks at 1.2 GB, down from 3.4 GB, and takes about 4 minutes on 2
processors. The vectors and the search results are the same.
(#68) - The worker loads the model only to embed a policy, and frees it after, so a running
instance uses about 1.2 GB, down from 2 GB.
(#70) - Nothing an instance serves loads from another site. FastAPI's
/docsand/redoc
pages are gone, and.env.examplenamesHTTPS_PROXYandNO_PROXY, for the proxy
dpolens pack updatedownloads through.
(#69) - What somebody asks stays out of the logs. A database error no longer prints the values
it was given, which put a failed search's question in the API's output word for word. The
API names each request's route instead of writing its address, the dashboard's server leaves
out query strings, and the MCP server no longer logs each call to the API or the words of a
refusal. The questions log redacts a key or a slug as it redacts a question, and a question
or an address carrying the NUL character is refused with 422 instead of failing.
(#72)
Running an instance says what machine an instance needs,
what it connects to, how to run it behind a proxy or with no internet, and how to back it up.
Images
Each is built for amd64 and arm64, and docker compose up in a checkout of this release pulls them.
ghcr.io/alkhatibdev/dpolens:0.2.0
ghcr.io/alkhatibdev/dpolens-mcp:0.2.0
ghcr.io/alkhatibdev/dpolens-dashboard:0.2.0
ghcr.io/alkhatibdev/dpolens-postgres:0.2.0
To check that an image was built here, from this tag: gh attestation verify oci://ghcr.io/alkhatibdev/dpolens:0.2.0 --repo alkhatibdev/dpolens.