Mirexa

Wiki Operations

Installing and building

The Go toolchain Mirexa needs, how to build each binary, the Docker images, and which platforms it runs on.

Mirexa is built from source with the Go toolchain; there are no prebuilt release archives in the repository. Every program is a statically linkable Go binary under cmd/, and a multi-stage Dockerfile builds container images for the node, the dashboard API and the dashboard's web front end.

Requirements

Need Version Why
Go 1.25 or newer (go 1.25.0 in go.mod) builds every binary
Node.js + pnpm Node 22 in the image build; pnpm via corepack only to build the dashboard front end (web/)
Docker with Compose any current only for the container images and the Compose stack

The Go module is github.com/AmiraliOmidvar/mirexa. Its third-party dependencies are few: hashicorp/raft (with a BoltDB log store) for the optional control plane, gRPC and protobuf for the control and replication listeners, zap and lumberjack for logging, the Prometheus client, klauspost/compress, fsnotify, and parquet-go (linked into mirexa-cli, for load).

Building the binaries

bash
make build

This runs go build -o bin/ ./cmd/..., so each binary is named after its directory:

Binary in bin/ Built from What it is Reference
server cmd/server the storage node (mirexa-server in the image) mirexa-server
cli cmd/cli mirexa-cli, the one operator tool: ingest, query, subscribe, calendar and admin commands, the bulk loader (load), and the offline token issuer (token) and node-certificate CA (certs) mirexa-cli, load, token, certs
dashboard cmd/dashboard the web dashboard's API server (mirexa-dashboard in the image) the web dashboard
reachcheck cmd/reachcheck a development gate (dead-code check); not used in operation —

To build one binary under the name the rest of this wiki uses:

bash
go build -o bin/mirexa-server ./cmd/server
bash
go build -o bin/mirexa-dashboard ./cmd/dashboard

make build-linux cross-compiles server and cli for linux/amd64. The binaries report no version flag; the server's control API reports the constant 0.1.0-dev as its version.

The dashboard front end

The browser application is a separate pnpm project in web/ (React, Vite, Tailwind). It compiles to static files served by a web server, not by any Go binary:

bash
make web-install
bash
cd web && pnpm run build

The output lands in web/dist/. make web-dev runs Vite's development server, which proxies /api to a running dashboard. See the web dashboard.

Docker images

The Dockerfile has three named targets, one per process:

Target Base Contents Runs as Exposes
mirexa alpine:3.20 /usr/local/bin/mirexa-server, an empty /var/lib/mirexa owned by uid 10001 uid 10001 9200 (wire), 9201 (observability)
dashboard alpine:3.20 /usr/local/bin/mirexa-dashboard; no key material uid 10002 8080 (API), 9101 (metrics)
web nginx:1.27-alpine the built SPA and deploy/nginx.conf nginx default 80

The Go stage builds with CGO_ENABLED=0 go build -trimpath -ldflags="-s -w", so the binaries are static and the runtime images need no libc. The ports in the table are the ones the shipped deploy/config/*.yaml files configure, not built-in defaults; the image's default command is -config /etc/mirexa/node.yaml (node) or -config /etc/mirexa/dashboard.yaml (dashboard), so a config file must be mounted there.

Build one target:

bash
docker build --target mirexa -t mirexa-server .

The Compose stack in deploy/ builds all three; see deploying with Docker Compose.

The Makefile's docker-build and docker-test targets predate the three-target Dockerfile: docker-build names no target (so it builds the last one, web), and docker-test runs /app/server, a path no current image contains. Use docker build --target ... or docker compose instead.

Platforms

Platform Server Notes
Linux (amd64, arm64) supported the platform the project is developed, tested and benchmarked on
macOS builds (checked with GOOS=darwin go build ./cmd/server, 2026-10-30) not tested; the node reports its data disk's size and free space as unknown
Windows does not build the WAL takes an exclusive flock on its directory (syscall.Flock), which Go does not provide on Windows

Platform-specific behaviour in the node:

  • The WAL lock. wal/wal.lock is held with flock(LOCK_EX|LOCK_NB), so two processes can never open one data directory; the second fails at startup.
  • Disk reporting. On Linux the node reports its data filesystem's total and free bytes (through statfs) in the cluster node statistics the dashboard shows; elsewhere it reports them as unknown rather than as zero.
  • Directory fsync. Every file installed by rename is followed by an fsync of its parent directory, so a file's name is as durable as its contents on filesystems (XFS, btrfs) that do not order those for you.[1]

Run the data directory on a local filesystem. Network filesystems are untested, and the durability guarantees rest on fsync and flock behaving as they do locally (unverified on any network filesystem).

Development checks

For contributors, not operators: make test, make test-race, make lint, make fuzz-short and make reachcheck are the gates, and make ci runs them together. make web-ci is the front end's gate and is separate. See DEVELOPMENT.md in the repository.

References

Source

Tests

Further reading

External


  1. Enforced by TestDurability_EveryRenameIsFollowedByADirectorySync. ↩︎