From 83a7d6de14250e2f7280c6c9b7274f8bef9c294d Mon Sep 17 00:00:00 2001 From: Philippe Loctaux
Date: Tue, 19 Nov 2024 23:41:14 +0100 Subject: [PATCH] removed Dockerfile --- Dockerfile | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index f3cf91a..0000000 --- a/Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -ARG RUST_VERSION=1.77 -FROM rust:${RUST_VERSION}-bookworm as builder - -# Install cargo-binstall, which makes it easier to install other -# cargo extensions like cargo-leptos -RUN wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz -RUN tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz -RUN cp cargo-binstall /usr/local/cargo/bin - -# Install cargo-leptos -RUN cargo binstall cargo-leptos -y - -# Add the WASM target -RUN rustup target add wasm32-unknown-unknown - -# Make an /app dir, which everything will eventually live in -RUN mkdir -p /app -WORKDIR /app -COPY . . - -# Generate wallpapers metadata -RUN cargo run -p gen-wallpapers --example cli -- ./public/wallpapers > crates/plcom/wallpapers.json - -# Build the app -RUN cargo leptos build --release -vv - -FROM debian:bookworm-slim as runtime -WORKDIR /app -RUN apt-get update -y \ - && apt-get install -y --no-install-recommends openssl ca-certificates \ - && apt-get autoremove -y \ - && apt-get clean -y \ - && rm -rf /var/lib/apt/lists/* - -# Copy the server binary to the /app directory -COPY --from=builder /app/target/release/plcom /app/ - -# /target/site contains our JS/WASM/CSS, etc. -COPY --from=builder /app/target/site /app/site - -# Copy Cargo.toml if it’s needed at runtime -COPY --from=builder /app/Cargo.toml /app/ - -# Set any required env variables and -ENV RUST_LOG="info" -ENV LEPTOS_SITE_ADDR="0.0.0.0:8000" -ENV LEPTOS_SITE_ROOT="site" -EXPOSE 8000 - -# Run the server -CMD ["/app/plcom"]