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. in go.) |
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
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/ |
the storage node (mirexa- in the image) |
mirexa-server |
cli |
cmd/ |
mirexa-, 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/ |
the web dashboard's API server (mirexa- in the image) |
the web dashboard |
reachcheck |
cmd/ |
a development gate (dead-code check); not used in operation | — |
To build one binary under the name the rest of this wiki uses:
go build -o bin/mirexa-server ./cmd/server
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:
make web-install
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: |
/, an empty / owned by uid 10001 |
uid 10001 | 9200 (wire), 9201 (observability) |
dashboard |
alpine: |
/; no key material |
uid 10002 | 8080 (API), 9101 (metrics) |
web |
nginx: |
the built SPA and deploy/ |
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:
docker build --target mirexa -t mirexa-server .
The Compose stack in deploy/ builds all three; see
deploying with Docker Compose.
The Makefile's
docker-buildanddocker-testtargets predate the three-target Dockerfile:docker-buildnames no target (so it builds the last one,web), anddocker-testruns/app/server, a path no current image contains. Usedocker build --target ...ordocker composeinstead.
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 ., 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.), which Go does not provide on Windows |
Platform-specific behaviour in the node:
- The WAL lock.
wal/wal.lockis held withflock(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
- /go.mod — module path, Go version and dependencies.
- /Makefile —
build,build-linux,web-*targets. - /Dockerfile — the three image targets.
wal.Managerlock —syscall.Flockon the WAL directory.diskSpace, non-Linux.
Tests
TestDeploy_TheDockerfileCopiesNoSecrets(/deploy/image_secrets_test.go).TestDurability_EveryRenameIsFollowedByADirectorySync(/internal/storage/durability_gate_test.go).
Further reading
External
- Go installation — https://go.dev/doc/install
- flock(2) — https://man7.org/linux/man-pages/man2/flock.2.html
Enforced by
TestDurability_EveryRenameIsFollowedByADirectorySync. ↩︎