FROM leptos-builder-musl AS builder WORKDIR /build COPY . . # needs to exist for clippy RUN mkdir -p target/stormscribe RUN cargo clippy -- -D warnings # RUN cargo leptos test RUN cargo leptos build --release # --------- # FROM scratch AS app ENV LEPTOS_OUTPUT_NAME=stormscribe ENV LEPTOS_SITE_ROOT=files ENV LEPTOS_SITE_PKG_DIR=pkg ENV LEPTOS_SITE_ADDR="0.0.0.0:3000" ENV LEPTOS_RELOAD_PORT=3001 USER 10001 WORKDIR /app COPY --chown=10001:10001 --from=builder /build/target/stormscribe/ ./files/ COPY --chown=10001:10001 --from=builder /build/target/release/stormscribe . EXPOSE 3000 ENTRYPOINT ["/app/stormscribe"]