-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
35 lines (24 loc) · 813 Bytes
/
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
34
35
FROM --platform=${BUILDPLATFORM} node:18.18.2-bullseye as node-builder
WORKDIR /build
COPY elune/package.json .
RUN yarn config set registry 'https://registry.npmmirror.com' && \
yarn install
COPY elune .
RUN yarn build
FROM golang:1.21.5-alpine3.18 as go-builder
WORKDIR /build
RUN apk add make git && \
go env -w GOPROXY=https://goproxy.cn,direct
COPY elune-backend/go.mod elune-backend/go.sum ./
RUN go mod download
COPY elune-backend .
COPY --from=node-builder /build/dist pkg/server/static
RUN make build
FROM nginx:stable-alpine
COPY default.conf /etc/nginx/conf.d/
RUN rm -rf /usr/share/nginx/html/*
COPY --from=node-builder /build/dist /usr/share/nginx/html
COPY --from=go-builder /build/bin /app
COPY entrypoint /docker-entrypoint.d
COPY elune-backend/config /app/config
EXPOSE 80 443