repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve payload type checking in OCPP, UI and Broadcast Channel
[e-mobility-charging-stations-simulator.git]
/
docker
/
Dockerfile
diff --git
a/docker/Dockerfile
b/docker/Dockerfile
index b568d8b5b0d8260a5a0ceeb8cb45e1673e15ba21..c5ac91aaefb97e8526147b0a58947fc697be7bdb 100644
(file)
--- a/
docker/Dockerfile
+++ b/
docker/Dockerfile
@@
-1,25
+1,34
@@
-FROM node:alpine as builder
+FROM node:
lts-
alpine as builder
WORKDIR /usr/builder
WORKDIR /usr/builder
-COPY package.json package-lock.json ./
+COPY package.json package-lock.json
prepare.js
./
RUN npm set progress=false && npm config set depth 0 && npm cache clean --force
RUN npm set progress=false && npm config set depth 0 && npm cache clean --force
-RUN npm install
+RUN apk add --no-cache --virtual .gyp \
+ build-base \
+ python3 \
+ && npm install \
+ && apk del .gyp
+COPY tsconfig.json rollup.config.mjs ./
+COPY src ./src
+COPY docker/config.json ./src/assets/config.json
RUN npm run build
RUN npm run build
-FROM node:alpine
+FROM node:lts-alpine
+
+ARG STACK_TRACE_LIMIT
+ARG MAX_OLD_SPACE_SIZE
WORKDIR /usr/app
WORKDIR /usr/app
+ENV NODE_OPTIONS="--stack-trace-limit=${STACK_TRACE_LIMIT} --max-old-space-size=${MAX_OLD_SPACE_SIZE}"
+
COPY --from=builder /usr/builder/node_modules ./node_modules
COPY --from=builder /usr/builder/node_modules ./node_modules
-COPY NOTICE LICENSE ./
-# COPY src ./src
-COPY dist ./dist
-COPY *.json ./
-COPY docker/config.json ./dist/assets/config.json
+COPY --from=builder /usr/builder/dist ./dist
+COPY README.md LICENSE ./
COPY docker/autoconfig.sh /autoconfig.sh
RUN chmod +x /autoconfig.sh
COPY docker/autoconfig.sh /autoconfig.sh
RUN chmod +x /autoconfig.sh
-#CMD ["node", "dist/start.js"]
-CMD /autoconfig.sh && node -r source-map-support/register dist/start.js
+#CMD ["node", "dist/start.
c
js"]
+CMD /autoconfig.sh && node -r source-map-support/register dist/start.
c
js