1 FROM node:lts-alpine as builder
5 COPY package.json package-lock.json ./
7 RUN npm set progress=false && npm config set depth 0 && npm cache clean --force
9 COPY tsconfig.json rollup.config.js ./
11 COPY docker/config.json ./src/assets/config.json
16 ARG MAX_OLD_SPACE_SIZE
20 ENV NODE_OPTIONS=--max-old-space-size=${MAX_OLD_SPACE_SIZE}
22 COPY --from=builder /usr/builder/node_modules ./node_modules
23 COPY --from=builder /usr/builder/dist ./dist
24 COPY README.md NOTICE LICENSE ./
25 COPY docker/autoconfig.sh /autoconfig.sh
26 RUN chmod +x /autoconfig.sh
28 #CMD ["node", "dist/start.js"]
29 CMD /autoconfig.sh && node -r source-map-support/register dist/start.js