Fix this scoping issue.
[e-mobility-charging-stations-simulator.git] / docker / Dockerfile
index 6b5e897f470d5b4be9bbf95e13622a625ae7a871..1d5dc942c6ec6db04f38a0aef56c578610e19a41 100644 (file)
@@ -6,6 +6,7 @@ COPY package.json package-lock.json ./
 
 RUN npm set progress=false && npm config set depth 0 && npm cache clean --force
 RUN npm install
+RUN npm run build
 
 FROM node:alpine
 
@@ -14,10 +15,11 @@ WORKDIR /usr/app
 COPY --from=builder /usr/builder/node_modules ./node_modules
 COPY NOTICE LICENSE ./
 COPY src ./src
+COPY dist ./dist
 COPY *.json ./
 COPY docker/config.json ./src/assets/config.json
 COPY docker/autoconfig.sh /autoconfig.sh
 RUN chmod +x /autoconfig.sh
 
 #CMD ["node", "src/start.js"]
-CMD /autoconfig.sh && node src/start.js
+CMD /autoconfig.sh && node -r source-map-support/register dist/start.js