nxtgauge-backend-rust/Dockerfile.base
Ashwin Kumar Sivakumar c85e6af22e feat(ai): complete AI plans/credits implementation and build tooling
- Add AI plans, credits, model routing, LiteLLM client, and orchestrator services
- Add AI management endpoints, auto-apply/auto-request handlers, and log endpoints
- Add cron jobs for daily action reset and monthly credit reset
- Add AI credit purchase flow in payments service
- Add ai_credit_packages migration with seed data
- Update Dockerfile build tooling across services
2026-06-15 06:15:49 +05:30

24 lines
720 B
Text

# Base image with all dependencies pre-compiled
# Build once, use for all services
FROM registry.nxtgauge.com/rust:alpine AS chef
RUN apk add --no-cache musl-dev pkgconfig openssl-dev && \
rustup target add x86_64-unknown-linux-musl && \
cargo install cargo-chef
WORKDIR /app
# Copy all manifests
COPY Cargo.toml Cargo.lock ./
COPY crates/ ./crates/
COPY apps/ ./apps/
# Prepare and cook all dependencies
RUN cargo chef prepare --recipe-path recipe.json && \
cargo chef cook --release --target x86_64-unknown-linux-musl --recipe-path recipe.json
# Keep this layer as the base
FROM chef
# The target directory now has all dependencies compiled!
# Services can copy just their source and build instantly