- 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
33 lines
965 B
Text
33 lines
965 B
Text
# Ultra-fast Dockerfile using pre-built dependencies
|
|
# This requires the base image to be built first!
|
|
# Base image build: ./scripts/build-base-image.sh
|
|
|
|
ARG SERVICE_NAME
|
|
|
|
# Use the pre-built base image with all dependencies cached
|
|
FROM registry.nxtgauge.com/nxtgauge-rust-base:latest AS builder
|
|
ARG SERVICE_NAME
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy ONLY the specific service source code
|
|
# Dependencies are already compiled in the base image!
|
|
COPY apps/${SERVICE_NAME}/ ./apps/${SERVICE_NAME}/
|
|
|
|
# Build just this service - dependencies already exist!
|
|
# This should take 10-30 seconds, not 15-20 minutes!
|
|
RUN cargo build --release \
|
|
--bin ${SERVICE_NAME} \
|
|
--target x86_64-unknown-linux-musl
|
|
|
|
# Minimal runtime image
|
|
FROM scratch
|
|
ARG SERVICE_NAME
|
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/${SERVICE_NAME} /app/service
|
|
|
|
USER 65532:65532
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT ["/app/service"]
|