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¶
Production tips¶
- Set explicit
host/portand 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 buildor targeted language tasks).
Versioned docs & config¶
- Publish docs with
task docs:publishafter syncing schemas/code. - Keep configuration declarative and environment-driven (see Configuration).
Example Dockerfile sketch¶
FROM rust:1.79-slim AS build
WORKDIR /app
COPY . .
RUN cargo build --release -p spikard-http
FROM debian:bookworm-slim
WORKDIR /app
COPY --from=build /app/target/release/spikard-http /usr/local/bin/spikard
ENV SPIKARD_PORT=8080
CMD ["spikard", "--port", "8080"]
Adjust packages/runtime depending on whether you run the CLI or embed routes in Rust.