21 lines
516 B
Docker
21 lines
516 B
Docker
FROM rust:latest as build
|
|
|
|
RUN rustup target add wasm32-unknown-unknown
|
|
RUN cargo install trunk wasm-bindgen-cli
|
|
|
|
RUN apt-get update && apt-get install -y npm binaryen && npm install -g sass
|
|
|
|
WORKDIR /app/src
|
|
COPY . .
|
|
|
|
RUN cd frontend && trunk build --release
|
|
RUN cargo build --release
|
|
|
|
FROM gcr.io/distroless/cc-debian10
|
|
RUN apt-get update && apt-get install -y libpq5
|
|
|
|
COPY --from=build /app/src/target/release/backend /app/backend
|
|
COPY --from=build /app/src/frontend/dist /app/dist
|
|
|
|
WORKDIR /app
|
|
CMD ["./backend"] |