Skip to content

Ops Panel: Architecture ​

Updated: 11/17/26, 11:11:35 AM

The Ops Panel is a deployment and operations console for a single machine: you operate in a browser, and it executes Docker and file operations on the host. This page covers its component boundaries, where state lives, and a few design choices related to reliability.

Control Plane and Managed Plane ​

LayerWhat it isKey point
Panel processSingle Go binary, frontend embedded with go:embedThe panel runs no containers itself; it only orchestrates Docker on the host
Base environment stackPostgreSQL, Redis, ArtemisStrong random passwords generated; one-click password change synced to consumers
Business application stackMain app, channel sub-apps, admin / merchant / H5Image builds and per-service deployment both live in this stack
Gateway stackStandalone nginxOrigin always 80; HTTPS is terminated by an outer CDN / gateway, which then goes back to origin
State fileinstaller-state.json (0644, atomic writes).env and compose are rendered from it; there is no second copy of the truth

Boundaries of the Three Compose Stacks ​

Three stacks instead of one big compose, because their lifecycles differ: the base environment lives as long as the machine, the business stack is rebuilt on every release, and the gateway is only adjusted when domains or certificates change. Split this way, rebuilding business containers never touches database volumes, and gateway changes never restart business services.

Stacks connect through Docker networks and container names (the business stack reaches postgresql / redis / artemis; the gateway upstream points at backend:9999), so do not rename services casually.

State and Drift ​

The panel honors exactly one source of truth for state: installer-state.json in the working directory.

  • Saving configuration only updates the state file; it does not take effect immediately;
  • Deployment renders .env and docker-compose.yml from the state, then runs pull / up;
  • When configuration changed but was not redeployed, the page flags it as drift and offers two actions: "Redeploy" or "Apply Configuration";
  • When containers are running but a snapshot is missing, startup fills the snapshot from the current state automatically, so the panel never diverges from reality.

The payoff is that the panel can restart without losing configuration; the cost is that configuration and runtime state may briefly disagree — do not ignore drift warnings.

Tasks and Logs ​

Installing Docker, pulling source, building images, and deploying services are long tasks; all use one asynchronous task model:

  • Tasks run with a single concurrency on the server; state is persisted, so refreshing the page resumes the view;
  • Progress is streamed over SSE and also written to the panel's own log (size-based rotation);
  • Tasks can be cancelled, and history has a cap so it does not grow without bound.

Container logs are read separately from docker logs tails, polled by the frontend, and kept apart from task logs.

Why a Single Binary ​

  • The deployment target is a bare machine; the panel must not depend on Node, Java, or a database on the host;
  • With the frontend embedded, an upgrade only replaces one file (panel self-upgrade uses the same path);
  • The panel carries no business traffic; if it goes down, payments are unaffected, and access and accounts can still be recovered via the TUI and command line.

Design Constraints ​

ConstraintReason
Requires root / sudo; optional systemd serviceIt operates Docker, writes /opt/daxpay, and changes system services
Origin listens on 80 only, no direct HTTPSCertificates and CDNs differ per customer; outer termination is more stable
Empty password = generate randomly and write back; the API only reports whether one is setKeeps passwords out of pages and logs
All write operations are audited (SQLite)Deployment and password changes must be traceable
No changes to business configurationBusiness runtime parameters are managed by the main app; the panel only injects and restarts