- Gitea Actions workflows: ci.yml (tests+clippy+fmt), benchmark.yml (P99 gate), deploy.yml (Fly+CF) - Fly.io configs: proxy (shared-cpu, 256MB, min 1 machine), API (scale-to-zero) - Dockerfiles: multi-stage Rust builds for proxy and API binaries - INFRASTRUCTURE.md: full V1 stack (~$5/mo), AWS migration path, Gitea runner setup, DNS plan - Stack: Fly.io + Cloudflare Pages + Neon + Upstash + Gitea Actions
14 lines
385 B
Docker
14 lines
385 B
Docker
# --- Build stage ---
|
|
FROM rust:1.78-slim AS builder
|
|
WORKDIR /app
|
|
COPY Cargo.toml Cargo.lock ./
|
|
COPY src/ src/
|
|
RUN cargo build --release --bin dd0c-api
|
|
|
|
# --- Runtime stage ---
|
|
FROM debian:bookworm-slim
|
|
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
|
COPY --from=builder /app/target/release/dd0c-api /usr/local/bin/
|
|
EXPOSE 3000
|
|
CMD ["dd0c-api"]
|