-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
33 lines (24 loc) · 1.11 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
ARG node_base_image=node:18-slim
ARG rust_base_image=rust:1.73
FROM ${node_base_image} AS front_end
WORKDIR /app
COPY ./sponsoredTransactionsAuction/frontend/package.json ./package.json
COPY ./sponsoredTransactionsAuction/frontend/tsconfig.node.json ./tsconfig.node.json
COPY ./sponsoredTransactionsAuction/frontend/tsconfig.json ./tsconfig.json
COPY ./sponsoredTransactionsAuction/frontend/vite.config.ts ./vite.config.ts
COPY ./sponsoredTransactionsAuction/frontend/src ./src
COPY ./sponsoredTransactionsAuction/frontend/index.html ./index.html
COPY ./sponsoredTransactionsAuction/frontend/generated ./generated
RUN yarn
RUN yarn build
FROM ${rust_base_image} AS back_end
WORKDIR /backend/app
COPY ./deps/concordium-rust-sdk /deps/concordium-rust-sdk
COPY ./sponsoredTransactionsAuction/backend ./
RUN cargo build --release
FROM ubuntu:22.04
WORKDIR /build
COPY --from=back_end ./backend/app/target/release/sponsored-transaction-backend ./sponsored-transaction-backend
COPY --from=front_end ./app/dist ./public
RUN apt-get update && apt-get install -y ca-certificates
CMD ./sponsored-transaction-backend --frontend public