Skip to content

Instantly share code, notes, and snippets.

@bengrunfeld
Last active August 12, 2020 07:16
Show Gist options
  • Save bengrunfeld/3c45eafef2f183a8226935e9fd53eff3 to your computer and use it in GitHub Desktop.
Save bengrunfeld/3c45eafef2f183a8226935e9fd53eff3 to your computer and use it in GitHub Desktop.
Dockerfile for a MongoDB on a Node.JS app
FROM node:12.18.3
WORKDIR /usr/src/app
COPY package*.json ./
ENV MONGO_URL "mongodb://mongo:27017"
ENV DB_NAME points
ENV COL_NAME dataPoints
RUN npm install
COPY . .
RUN npm run build
EXPOSE 4000
CMD ["npm", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment