Skip to content

feat(run): run the complete local stack with orcha run - #95

Merged
slint merged 3 commits into
inveniosoftware:mainfrom
slint:sqlite-local-run
Aug 13, 2026
Merged

feat(run): run the complete local stack with orcha run#95
slint merged 3 commits into
inveniosoftware:mainfrom
slint:sqlite-local-run

Conversation

@slint

@slint slint commented Jul 22, 2026

Copy link
Copy Markdown
Member
  • orcha run applies migrations, starts a Temporal dev server, waits for it, then starts the API (with hot reload) and worker as prefixed subprocesses, tearing everything down if any of them exits. --reset clears orcha.db and temporal.db first; a normal shutdown leaves both files in place. orcha run server and orcha run workers still start the individual processes. Requires the temporal CLI.
  • SQLite is now the local-development default so contributors don't need Docker/PostgreSQL; PostgreSQL is still the production default. New config: DB_URL overrides everything; otherwise DB_DIALECT picks between DB_PATH (sqlite) and DB_USER/DB_PASSWORD/DB_HOST/DB_PORT/DB_NAME (postgresql).
  • Breaking: PGUSER/PGPASSWORD/PGHOST/PGPORT/PGDATABASE are removed with no aliases; the Helm chart's databaseEnv now sets DB_DIALECT=postgresql and the DB_* vars instead. The existing Alembic history also runs on SQLite (batch mode in the 465d6f3db028 migration); automated migration coverage stays PostgreSQL-only.
  • orcha run also sets DEV_MODE, which skips token verification and serves every request as the dev tenant. A real tenant id stays on the request context, so the column stays non-nullable and the scoping checks still run. AUTH_DISABLED is now unset by default and gets automatically set by DEV_MODE; it can still be set explicitly though, so AUTH_DISABLED=0 will require real tenant tokens against a registered key locally.
  • For deployments, where the registry still applies, there's a new orcha tenants group: add registers a tenant's public key (--kid, --name, --force), list prints tenants with their key ids, and token signs a token from a private key (--workflow-id, --expires-in).

@slint
slint force-pushed the sqlite-local-run branch from 18e97d2 to 547a7f2 Compare August 12, 2026 08:58
slint added 2 commits August 12, 2026 14:21
Getting started meant installing Docker, bringing up PostgreSQL and
Temporal, then running the API and worker in separate shells. SQLite
covers what the app does locally, so the default database is now a file
and one command owns the whole stack, tearing it down as a unit when any
process exits.

PostgreSQL stays the production default. The PG* settings are removed
rather than aliased to the new DB_* ones, so the Helm chart sets DB_*
instead.
Pointing a local InvenioRDM at Orcha meant generating an RSA pair,
dropping the private half in the instance folder and hand-writing the
public half into tenants.json. Tenants mean nothing on a development
machine, so DEV_MODE skips verification and pins every request to one
named dev. That keeps a real tenant id on the context, so the column
stays non-nullable and the scoping checks still run.

AUTH_DISABLED is separate and wins when set, so the local stack can still
exercise real tenant tokens against a registered key.
@slint
slint merged commit c5a94f1 into inveniosoftware:main Aug 13, 2026
3 checks passed
@slint
slint deleted the sqlite-local-run branch August 13, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants