This commit is contained in:
2025-12-12 23:35:17 -07:00
parent 01452011f1
commit cd514627de
17 changed files with 2538 additions and 16 deletions

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM rust:1.75-slim AS builder
WORKDIR /app
# Cache dependencies first
COPY Cargo.toml ./
COPY src ./src
RUN cargo build --release
FROM debian:bookworm-slim AS runtime
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/rustapi /usr/local/bin/rustapi
EXPOSE 8080
CMD ["rustapi"]