From 839ee153cabb3f91fc7fe2fd48898075af60c412 Mon Sep 17 00:00:00 2001 From: anatol Date: Mon, 4 Jan 2021 10:36:33 +0300 Subject: [PATCH] Build a node app --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2d0bba0f..bc85bd2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,16 +5,18 @@ RUN mkdir -p /home/node/bc/node_modules && chown -R node:node /home/node/bc WORKDIR /home/node/bc COPY --chown=node:node package*.json ./ -COPY --chown=node:node dist ./dist COPY --chown=node:node config ./config +COPY --chown=node:node tsconfig.build.json ./ +COPY --chown=node:node tsconfig.json ./ +COPY --chown=node:node nest-cli.json ./ COPY --chown=node:node .env ./ +COPY --chown=node:node src ./src USER node RUN npm install - -#COPY --chown=node:node . . +RUN npm run build EXPOSE 3000 -CMD [ "node", "./dist/main.js" ] \ No newline at end of file +CMD [ "npm", "run", "start" ]