init
This commit is contained in:
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
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"]
|
||||
Reference in New Issue
Block a user