File size: 840 Bytes
94d5fc0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM node:20 as builder

WORKDIR /app

# RUN npm set registry https://registry.npmjs.org
COPY package.json /app/package.json
COPY package-lock.json /app/package-lock.json
COPY .npmrc /app/.npmrc
RUN npm install

COPY .eslintrc.json /app/.eslintrc.json
COPY .eslintignore /app/.eslintignore
COPY .prettierrc /app/.prettierrc
COPY .prettierignore /app/.prettierignore
COPY tsconfig.json /app/tsconfig.json
COPY config.json /app/config.json
COPY lib /app/lib
COPY __tests__ /app/__tests__
COPY config.json /app/config.json
RUN npm run build

COPY static /app/static

FROM node:20

WORKDIR /app

COPY --from=builder /app/node_modules /app/node_modules
COPY --from=builder /app/es5 /app/es5
COPY --from=builder /app/static /app/static
COPY --from=builder /app/config.json /app/config.json

EXPOSE 7860

ENTRYPOINT ["node"]
CMD ["es5/server.js"]