blob: 66c2fe4775a5b5d43902aaadc753d015e1774a48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
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"]
|