s365b.cli¶
The s365b command: one entry point for every container role.
Examples:
s365b migrate # apply database migrations
s365b api # run the web API
s365b worker # run background jobs (and the scheduler tick)
s365b generate-master-key # print a new master key
Attributes¶
Functions¶
|
Print the version. |
|
Create a new master key for encrypting secrets in the database. |
|
Apply database migrations (app schema and job queue schema). |
|
Run the web API. |
|
Run background jobs and the scheduler tick. |
|
Issue a new one-time setup token for creating the first admin in the web UI. |
|
Create a break-glass admin from the command line (prompts for password and code). |
|
Reset a break-glass admin's authenticator and recovery codes (and unlock it). |
|
Queue a backup job to run now. |
|
Read every blob of every repository and report unreadable ones. |
Module Contents¶
- s365b.cli.generate_master_key(output: Annotated[pathlib.Path | None, typer.Option(help='Write to this file (mode 0600)')] = None) None[source]¶
Create a new master key for encrypting secrets in the database.
- s365b.cli.api(host: Annotated[str, typer.Option(help='Bind address')] = '0.0.0.0', port: Annotated[int, typer.Option(help='Port')] = 8000) None[source]¶
Run the web API.
- s365b.cli.worker(queues: Annotated[str, typer.Option(help='Comma-separated queues; empty for all')] = '', concurrency: Annotated[int, typer.Option(help='Jobs run at the same time')] = 2) None[source]¶
Run background jobs and the scheduler tick.
- s365b.cli.setup_token() None[source]¶
Issue a new one-time setup token for creating the first admin in the web UI.
- s365b.cli.create_local_admin(username: str) None[source]¶
Create a break-glass admin from the command line (prompts for password and code).
Use inside the api container:
docker compose exec api s365b create-local-admin NAME.
- s365b.cli.reset_local_admin(username: str, new_password: Annotated[bool, typer.Option(help='Also set a new password')] = False) None[source]¶
Reset a break-glass admin’s authenticator and recovery codes (and unlock it).
For when the authenticator is lost and no other admin can sign in. Requires shell access to the server, which is the trust boundary.
- s365b.cli.repository_check(repair: Annotated[bool, typer.Option(help='Repair around unreadable blobs')] = False) None[source]¶
Read every blob of every repository and report unreadable ones.
With –repair: remove the versions that use them, reset the affected objects so the next backup stores those items again, and delete the unreadable blobs. Waits for no one: fails if a backup is running.