Skip to content

Deployment

Build and runtime orchestration for Nara binaries, UI assets, and documentation.

  • bin/nara: Standalone binary with embedded UI and docs.
  • bin/nara-backup: CLI for ledger operations.
  • nara-web/public: Pre-compiled SPA and docs site.
  • Embedding: Web assets must be built before the Go binary.
  • Unified Port: Single HTTP port serves API and UI.
graph TD
    A[npm run build: SPA] --> D[nara-web/public]
    B[astro build: Docs] --> D
    D --> E[go build: cmd/nara]
    E --> F[bin/nara: Embedded Artifact]
  • build-web: Compiles SPA and docs.
  • build: Compiles bin/nara (includes web).
  • build-backup: Compiles backup utility.
  • build-nix: Reproducible Nix build.
  • clean: Artifact removal.

Configuration (fly.toml):

  • Port: 8080.
  • Health Check: GET / every 15s.
  • Stale Assets: Empty/missing UI if build-web is skipped.
  • Port Conflict: Instances on same host require unique -http-addr.
  • Standalone: Produce functional executable.
  • Accessibility: Verify / and /docs/ on a running node.