dockerfile 435 B

1234567891011121314151617181920212223
  1. FROM node:14
  2. # Create app directory
  3. RUN mkdir -p /usr/src/app
  4. WORKDIR /usr/src/app
  5. # Installing node dependencies
  6. COPY package.json ./
  7. RUN npm install
  8. # Copying source files
  9. COPY . .
  10. # Install MongoDB tools (mongodump) - this example assumes you're using Debian/Ubuntu-based image
  11. RUN apt-get update && \
  12. apt-get install -y mongodb-clients && \
  13. apt-get clean
  14. # Building app
  15. EXPOSE 5000
  16. # Running the app
  17. CMD "npm" "start"