Major additions: - Community Next.js app (port 18187) for browsing claims with API docs - stemedb-chaos crate: Fault injection, chaos testing, CRDT properties - Latent ingestion system: Reddit/FDA ingesters with ADK-Go agents - Disputed claims handling: Manual review workflows and validation - Aphoria security scanner: New extractors (SQL injection, command injection, weak crypto, TLS version), policy-based ignores, UAT reports - Docker infrastructure: Dockerfile, docker-compose.yml for full stack - VulnBank demo: Intentionally vulnerable multi-language test corpus SDK & API enhancements: - Source registry handlers for tracking data provenance - Metrics endpoint - Skeptic filtering improvements Code quality: - Split 14 large files (>500 lines) into focused modules - All files now under 500-line limit per project guidelines Documentation: - Chaos testing guide, circuit breakers, observability docs - Phase 7 UAT documentation updates - Martin Kleppmann technical writer agent Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
54 lines
1.3 KiB
Docker
54 lines
1.3 KiB
Docker
# StemeDB API Docker Build
|
|
#
|
|
# Multi-stage build for the stemedb-api binary.
|
|
# Produces a minimal Debian-based image with just the compiled binary.
|
|
|
|
# Stage 1: Build the Rust binary
|
|
# Use latest Rust for compatibility with newer crates
|
|
FROM rust:bookworm AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy manifests first for better layer caching
|
|
COPY Cargo.toml Cargo.lock ./
|
|
|
|
# Copy workspace members
|
|
COPY crates/ crates/
|
|
COPY applications/ applications/
|
|
COPY sdk/ sdk/
|
|
|
|
# Build release binary (only stemedb-api)
|
|
RUN cargo build --release -p stemedb-api
|
|
|
|
# Stage 2: Runtime image
|
|
FROM debian:bookworm-slim
|
|
|
|
# Install runtime dependencies
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy the binary from builder
|
|
COPY --from=builder /app/target/release/stemedb-api /usr/local/bin/stemedb-api
|
|
|
|
# Create data directories
|
|
RUN mkdir -p /data/wal /data/db
|
|
|
|
# Set environment defaults
|
|
ENV STEMEDB_WAL_DIR=/data/wal \
|
|
STEMEDB_DB_DIR=/data/db \
|
|
STEMEDB_BIND_ADDR=0.0.0.0:18180 \
|
|
RUST_LOG=stemedb_api=info
|
|
|
|
# Expose the API port
|
|
EXPOSE 18180
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=5s --timeout=3s --start-period=10s --retries=3 \
|
|
CMD curl -f http://localhost:18180/v1/health || exit 1
|
|
|
|
# Run the API server
|
|
CMD ["stemedb-api"]
|