-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (30 loc) · 729 Bytes
/
Dockerfile
File metadata and controls
37 lines (30 loc) · 729 Bytes
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
34
35
36
37
# -----------------
# Front build stage
# -----------------
FROM node:13.13.0 as website
COPY ./website ./website
WORKDIR /website
RUN npm ci && npm run export
# -----------------
# Cargo build stage
# -----------------
FROM rust:1.50.0 as cargo-build
RUN USER=root cargo new --bin bast
WORKDIR /bast
COPY Cargo.lock .
COPY Cargo.toml .
COPY migrations ./migrations
COPY static ./static
RUN mkdir -p ./static/front
RUN mkdir .cargo
RUN cargo vendor > .cargo/config
COPY ./server server
RUN rm -rf src/
RUN cargo build --release
RUN cargo install --path . --verbose
# -----------------
# Final stage
# -----------------
COPY --from=website /website/out /bast/static/front/
CMD ["/usr/local/cargo/bin/bast"]
EXPOSE 3333