diff options
Diffstat (limited to 'docker/app.Dockerfile')
-rw-r--r-- | docker/app.Dockerfile | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/docker/app.Dockerfile b/docker/app.Dockerfile new file mode 100644 index 0000000..66c2fe4 --- /dev/null +++ b/docker/app.Dockerfile @@ -0,0 +1,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"] + |