serve vue spa from axum
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s

This commit is contained in:
2025-07-18 01:49:28 +01:00
parent de9aff6561
commit f9047644fe
48 changed files with 13819 additions and 11 deletions

View File

@ -1,3 +1,12 @@
FROM node:24-alpine AS node-builder
WORKDIR /app
COPY ui/package-lock.json .
COPY ui/package.json .
RUN npm install
COPY ui .
RUN npm run build
FROM rust:1.87 AS base
RUN cargo install --locked cargo-chef sccache
ENV RUSTC_WRAPPER=sccache SCCACHE_DIR=/sccache
@ -22,9 +31,12 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
FROM gcr.io/distroless/cc AS runtime
WORKDIR /app
ADD --chmod=a+x vendor/busybox_WGET /usr/bin/wget
COPY --from=builder /app/target/release/nuchat /usr/bin/
COPY --from=node-builder /app/dist dist
COPY --from=builder /app/target/release/nuchat .
# HEALTHCHECK --interval=5s --retries=1 --timeout=5s CMD ["wget", "-q", "--spider", "http://localhost:7000/healthcheck
ENTRYPOINT [ "nuchat", "--host", "0.0.0.0" ]
ENTRYPOINT [ "/app/nuchat", "--host", "0.0.0.0" ]