| 1234567891011121314151617181920212223 |
- FROM node:14
- # Create app directory
- RUN mkdir -p /usr/src/app
- WORKDIR /usr/src/app
- # Installing node dependencies
- COPY package.json ./
- RUN npm install
- # Copying source files
- COPY . .
- # Install MongoDB tools (mongodump) - this example assumes you're using Debian/Ubuntu-based image
- RUN apt-get update && \
- apt-get install -y mongodb-clients && \
- apt-get clean
- # Building app
- EXPOSE 5000
- # Running the app
- CMD "npm" "start"
|