nxtgauge-backend-rust/Dockerfile.migrate
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

28 lines
962 B
Text

FROM registry.nxtgauge.com/rust:alpine AS builder
WORKDIR /app
RUN apk add --no-cache curl ca-certificates bash build-base musl-dev pkgconfig openssl-dev openssl-libs-static
RUN update-ca-certificates
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustup target add x86_64-unknown-linux-musl
COPY Cargo.toml Cargo.lock ./
COPY crates/db-migrate ./crates/db-migrate
COPY crates/db ./crates/db
COPY crates/cache ./crates/cache
COPY crates/email ./crates/email
WORKDIR /app/crates/db-migrate
ENV OPENSSL_STATIC=1
ENV OPENSSL_DIR=/usr
RUN cargo build --release --bin db-migrate --target x86_64-unknown-linux-musl
FROM registry.nxtgauge.com/alpine:3.20
RUN apk add --no-cache ca-certificates libpq
COPY --from=builder /app/crates/db-migrate/target/x86_64-unknown-linux-musl/release/db-migrate /usr/local/bin/
COPY crates/db/migrations /migrations
ENTRYPOINT ["db-migrate"]