Created
January 30, 2018 07:12
-
-
Save JohannesFischer/3c1351c9b5031b256b328cdd7973ce22 to your computer and use it in GitHub Desktop.
Docker Mongo Node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2" | |
services: | |
app: | |
container_name: app | |
restart: always | |
build: . | |
ports: | |
- "8000:8000" | |
links: | |
- mongo | |
mongo: | |
container_name: mongo | |
image: mongo | |
volumes: | |
- ./data:/data/db | |
ports: | |
- "27017:27017" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:latest | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY package.json /usr/src/app/ | |
RUN npm install | |
COPY . /usr/src/app | |
EXPOSE 8000 | |
CMD [ "npm", "start" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment