-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (32 loc) · 807 Bytes
/
Dockerfile
File metadata and controls
49 lines (32 loc) · 807 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
38
39
40
41
42
43
44
45
46
47
48
49
ARG HTTP_PROXY=""
ARG HTTPS_PROXY=""
FROM docker.io/library/rust:1.90-alpine AS rust_builder
RUN mkdir /app-builder
WORKDIR /app-builder
RUN apk add \
musl-dev \
pkgconfig \
openssl-dev \
curl
ENV OPENSSL_DIR=/usr
COPY Cargo.toml ./
COPY Cargo.lock ./
COPY cli cli
COPY common common
COPY entity entity
COPY migration migration
COPY server server
RUN cargo build --release -p appledb_server
FROM docker.io/library/node:18.20-alpine3.21 AS web_builder
RUN mkdir /app
WORKDIR /app
COPY web ./
RUN yarn install
RUN yarn build
FROM docker.io/library/alpine:3.21
RUN mkdir /app
RUN mkdir /app/dist
COPY --from=web_builder /app/dist /app/dist
COPY --from=rust_builder /app-builder/target/release/appledb_server /app
ENV CONFIG_PATH="/app/config.yaml"
CMD [ "/app/appledb_server"]