v0.11.0

Deployment Records

Last updated


This page explains the deployment info and operation records the CLI sends to the API server on every operation, and how the dismiss flag changes.

When the CLI Reports


FunctionCalledAPIOn failure
removePod()After up clears old containers, at the start of clear, after downPOST /api/pod/update/:uid with a zero-valued Pod body where dismiss is 1Ignored
upsertPod()At the end of upPOST /api/pod/upsertReturns an error; up fails
recordPod()At the end of every command, and during syncPOST /api/pod/record/insertIgnored

The CLI always targets http://localhost:8080. If the API server is down, up reports failed to upsert pod at the last step even though the remote containers are already running.

Record Content


Values of records.content:
ValueSource
syncRemote folder was empty; first sync
overwriteOverwrite confirmed after the diff preview
upup finished
clearclear finished
down / ps / logs / restart / exec / buildA passthrough command finished; the value is the command name

Each record also stores the hostname and first non-loopback IPv4 of the machine running the CLI. records.pod_id is resolved from uid to pods.id and is NOT NULL; the sync record of a first deployment happens before the pods row exists, so the lookup finds nothing and the insert fails silently.

dismiss State


stateDiagram-v2
    [*] --> Active: up (upsert)
    Active --> Removed: down / clear / cleanup before re-up
    Removed --> Active: up (upsert resets dismiss=0)
    Removed --> [*]
  1. stateDiagram-v2
  2. [*] --> Active: up (upsert)
  3. Active --> Removed: down / clear / cleanup before re-up
  4. Removed --> Active: up (upsert resets dismiss=0)
  5. Removed --> [*]

GET /api/pod/list returns only deployments with dismiss = 0. upsertPod() writes starting to status; removePod() sends an empty status, so a removed deployment has status = ''.

Database Location


ConditionPath
DB_PATH setThe value of DB_PATH
/.dockerenv exists/data/database.db
Otherwise~/.podrun/database.db; the folder is created when missing

See HTTP API for the table schema.
中文