-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathDockerfile
43 lines (30 loc) · 939 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
36
37
38
39
40
41
42
43
FROM node:22.14.0-alpine3.21 AS base
FROM base AS builder
WORKDIR /webapp
COPY webpack.config.js webpack.config.js
COPY .babelrc .babelrc
COPY package.json .
COPY package-lock.json .
RUN npm ci
# Adding UI files and building bundle
COPY public public
RUN NODE_ENV=production npm run build
FROM builder AS intermediate
COPY package.json package.json
COPY package-lock.json package-lock.json
RUN npm ci --omit=dev
####################
FROM base AS final
LABEL maintainer="contact@koumoul.com"
ENV NODE_ENV=production
WORKDIR /webapp
COPY README.md .
COPY config config
COPY server server
COPY --from=builder /webapp/public/index.html public/index.html
COPY --from=builder /webapp/public/assets/ public/assets/
COPY --from=builder /webapp/public/bundles/ public/bundles/
COPY --from=intermediate /webapp/node_modules node_modules
COPY VERSION.json* ./
EXPOSE 8080
CMD ["node", "--max-http-header-size", "64000", "server/app.js"]