mirror of
https://github.com/geoffsee/predict-otron-9001.git
synced 2025-09-08 22:46:44 +00:00
21 lines
537 B
Docker
21 lines
537 B
Docker
# Build stage
|
|
FROM rust:1-alpine AS builder
|
|
|
|
# Install build dependencies
|
|
RUN apk add --no-cache npm nodejs musl-dev pkgconfig openssl-dev git curl bash
|
|
|
|
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy manifest first (cache deps)
|
|
COPY . .
|
|
|
|
# Install cargo-leptos
|
|
RUN cargo binstall cargo-leptos
|
|
|
|
# Build release artifacts
|
|
RUN cargo leptos build --release
|
|
|
|
EXPOSE 8788
|
|
CMD ["cargo", "leptos", "serve", "--release"] |