nxtgauge-ai-assistant/Dockerfile

21 lines
682 B
Text
Raw Normal View History

FROM registry.nxtgauge.com/rust:alpine AS builder
2026-04-17 03:04:01 +02:00
RUN command -v cargo >/dev/null 2>&1 || apk add --no-cache cargo rust
RUN apk add --no-cache musl-dev pkgconfig openssl-dev
WORKDIR /app
COPY Cargo.toml Cargo.lock* ./
COPY src ./src
COPY migrations ./migrations
COPY seeds ./seeds
RUN cargo build --release
FROM registry.nxtgauge.com/alpine:3.20
RUN apk add --no-cache ca-certificates
WORKDIR /app
COPY --from=builder /app/target/release/nxtgauge-ai-assistant /usr/local/bin/nxtgauge-ai-assistant
COPY --from=builder /app/migrations ./migrations
COPY --from=builder /app/seeds ./seeds
ENV APP_HOST=0.0.0.0
ENV APP_PORT=8080
EXPOSE 8080
CMD ["/usr/local/bin/nxtgauge-ai-assistant"]