X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docker%2FDockerfile;h=f881284818f77d46030e277c614a6f5dbd23e30f;hb=29bf6658d0689f5df26575d3b171163fe1d52d04;hp=d681e2950399916ea01b8f273c7757688bd9b2af;hpb=7dde0b73302613be132c41e1f28a42de555dc2b6;p=e-mobility-charging-stations-simulator.git diff --git a/docker/Dockerfile b/docker/Dockerfile index d681e295..f8812848 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM node:lts-alpine as builder +FROM node:alpine as builder WORKDIR /usr/builder @@ -6,18 +6,20 @@ 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:lts-alpine +FROM node:alpine 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/config.json +COPY docker/config.json ./src/assets/config.json COPY docker/autoconfig.sh /autoconfig.sh RUN chmod +x /autoconfig.sh -#CMD ["node", "src/index.js"] -CMD /autoconfig.sh && node src/index.js +#CMD ["node", "dist/start.js"] +CMD /autoconfig.sh && node -r source-map-support/register dist/start.js