Phase 1: Fix compilation (config_path Option<PathBuf>, streaming test, stale test cleanup) Phase 2: Fix critical bugs (remove block_on deadlocks in 4 providers, fix broken SQL query builder) Phase 3: Security hardening (session manager, real auth, token masking, Gemini key to header, password policy) Phase 4: Implement stubs (real provider test, /proc health metrics, client/provider/backup endpoints, has_images) Phase 5: Code quality (shared provider helpers, explicit re-exports, all Clippy warnings fixed, unwrap removal, 6 unused deps removed, dashboard split into 7 sub-modules) Phase 6: Infrastructure (GitHub Actions CI, multi-stage Dockerfile, rustfmt.toml, clippy.toml, script fixes)
36 lines
993 B
Docker
36 lines
993 B
Docker
# ── Build stage ──────────────────────────────────────────────
|
|
FROM rust:1-bookworm AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Cache dependency build
|
|
COPY Cargo.toml Cargo.lock ./
|
|
RUN mkdir src && echo 'fn main() {}' > src/main.rs && \
|
|
cargo build --release && \
|
|
rm -rf src
|
|
|
|
# Build the actual binary
|
|
COPY src/ src/
|
|
RUN touch src/main.rs && cargo build --release
|
|
|
|
# ── Runtime stage ────────────────────────────────────────────
|
|
FROM debian:bookworm-slim
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends ca-certificates && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/target/release/llm-proxy /app/llm-proxy
|
|
COPY static/ /app/static/
|
|
|
|
# Default config location
|
|
VOLUME ["/app/config", "/app/data"]
|
|
|
|
EXPOSE 8080
|
|
|
|
ENV RUST_LOG=info
|
|
|
|
ENTRYPOINT ["/app/llm-proxy"]
|