Skip to content

Deployment

Spikard can run as a compiled Rust binary, via the CLI, or packaged into containers. Pick the surface that matches your stack; the runtime behavior stays the same.

Local run options

Runtime serving via CLI is planned. Start your binding directly, e.g. python app.py.

cargo run --bin spikard-http -- --port 8000
pnpm ts-node app.ts
python app.py
bundle exec ruby app.rb

Production tips

  • Set explicit host/port and timeouts; avoid relying on defaults in container platforms.
  • Enable structured logging + tracing (OTel recommended) and forward request IDs.
  • Run health checks against a lightweight endpoint with minimal middleware.
  • Use the Taskfile to build bindings before containerizing (task build or targeted language tasks).

Versioned docs & config

  • Publish docs with task docs:deploy after syncing schemas/code.
  • Keep configuration declarative and environment-driven (see Configuration).

Example Dockerfile sketch

FROM rust:1.85-slim AS build
WORKDIR /app
COPY . .
RUN cargo build --release

FROM debian:bookworm-slim
WORKDIR /app
COPY --from=build /app/target/release/your_app /usr/local/bin/your_app
ENV HOST=0.0.0.0
ENV PORT=8080
CMD ["your_app"]

Replace your_app with your binary name. Configure host and port via environment variables in your ServerConfig.

Edit this page on GitHub