Skip to content

Commit

Permalink
Build a node app
Browse files Browse the repository at this point in the history
  • Loading branch information
rielas committed Jan 4, 2021
1 parent e6e4d50 commit 839ee15
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
CMD [ "npm", "run", "start" ]

0 comments on commit 839ee15

Please sign in to comment.