dockerfile for server

Orual bace6b72 5b07a7ff

+41
+6
.dockerignore
··· 1 + **/target 2 + **/dist 3 + LICENSES 4 + LICENSE 5 + temp 6 + **/README.md
+35
Dockerfile
··· 1 + FROM rust:1 AS chef 2 + RUN cargo install cargo-chef 3 + WORKDIR /app 4 + 5 + FROM chef AS planner 6 + COPY . . 7 + RUN cargo chef prepare --recipe-path recipe.json 8 + 9 + 10 + FROM chef AS builder 11 + COPY --from=planner /app/recipe.json recipe.json 12 + RUN cargo chef cook --release --recipe-path recipe.json 13 + COPY . . 14 + 15 + # Install `dx` 16 + RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash 17 + RUN cargo binstall dioxus-cli --root /.cargo -y --force 18 + ENV PATH="/.cargo/bin:$PATH" 19 + 20 + # Create the final bundle folder. Bundle always executes in release mode with optimizations enabled 21 + RUN dx bundle -p weaver-server 22 + 23 + FROM chef AS runtime 24 + 25 + COPY --from=builder /app/target/dx/weaver_server/release/web/ /usr/local/app 26 + 27 + # set our port and make sure to listen for all connections 28 + ENV PORT=8080 29 + ENV IP=0.0.0.0 30 + 31 + # expose the port 8080 32 + EXPOSE 8080 33 + 34 + WORKDIR /usr/local/app 35 + ENTRYPOINT [ "/usr/local/app/weaver-server" ]