This commit is contained in:
Johannes Heuel
2022-06-25 17:16:13 +02:00
commit 9449d992c0
33 changed files with 5100 additions and 0 deletions

21
Dockerfile Normal file
View 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"]