Skip to content

Operations

ddddd edited this page Jun 21, 2026 · 1 revision

Operations

SPACK provides CLI checks that can run before the runtime starts. Use them in CI/CD admission checks and container build verification.

Inspect assets before deployment

Use inspect to scan an asset directory without starting the HTTP server:

spack inspect --assets /app

The report includes:

  • Resource count.
  • Source sidecar count.
  • Total source and asset bytes.
  • Compression savings from existing .br, .zst, and .gz sidecars.
  • Image assets that can generate configured variants.
  • Estimated memory-cache warm bytes.
  • Potential issues such as missing entry or fallback assets.

The command emits JSON so it can be used by deployment automation.

Recommended preflight

For direct directory serving:

spack config validate --file spack.yaml
spack config print-effective --file spack.yaml --redact
spack inspect --assets /app

For AOT serving:

spack-compiler compile /app/dist -o /app/app.spack
spack config validate --file spack.yaml
spack config print-effective --file spack.yaml --redact

Treat warnings from inspect as deployment review items, especially missing assets.entry, missing fallback targets, and cache budgets that are smaller than the scanned asset set.

Runtime modes

SPACK runtime supports both deployment modes:

  • Direct mode: point assets.root at a frontend build output directory.
  • AOT mode: point assets.root at a compiler-produced .spack bundle.

Direct mode is useful for compatibility and simple deployments. AOT mode is the preferred path for performance-sensitive releases because heavy compression, image generation, and indexing can happen before production traffic reaches the runtime.

Clone this wiki locally