eka vedos
This commit is contained in:
26
network-poc/Dockerfile.prod
Normal file
26
network-poc/Dockerfile.prod
Normal file
@@ -0,0 +1,26 @@
|
||||
FROM rust:slim AS builder
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl pkg-config libssl-dev g++ \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
|
||||
# Rakenna Wasm-paketti
|
||||
RUN cd node && wasm-pack build --target web --out-dir ../static/pkg
|
||||
|
||||
# Rakenna Hub release-binääri
|
||||
RUN cargo build --release -p hub
|
||||
|
||||
FROM debian:bookworm-slim
|
||||
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /app/target/release/hub /usr/local/bin/hub
|
||||
COPY --from=builder /app/static /app/static
|
||||
|
||||
WORKDIR /app
|
||||
EXPOSE 3000
|
||||
CMD ["hub"]
|
||||
Reference in New Issue
Block a user