-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdockerfile
More file actions
33 lines (23 loc) · 849 Bytes
/
dockerfile
File metadata and controls
33 lines (23 loc) · 849 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
FROM node:lts-slim AS build
ENV NODE_ENV=production NODE_OPTIONS="--max_old_space_size=2048"
RUN apt-get update && apt-get install -y fontconfig && rm -rf /var/lib/apt/lists/*
WORKDIR /Papermap
COPY package.json ./
RUN npm install --omit=dev
COPY . .
RUN npm run build
FROM node:lts-slim AS run
ENV NODE_ENV=production NODE_OPTIONS="--max_old_space_size=2048"
WORKDIR /Papermap
COPY --from=build /Papermap/build ./build
COPY --from=build /Papermap/data ./data
COPY --from=build /Papermap/node_modules ./node_modules
COPY --from=build /Papermap/resources ./resources
COPY --from=build /Papermap/scripts ./scripts
COPY --from=build /Papermap/static ./static
COPY --from=build /Papermap/tmp ./tmp
COPY --from=build /Papermap/package*.json ./
COPY --from=build /Papermap/server.js ./server.js
USER node
EXPOSE 3000
CMD [ "node", "server.js" ]