Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
version: "3.4"
services:
mongodb:
image: mongo/mongo:3.7.1-jessie
ports:
- "27017"
networks:
- dbnet
volumes:
- dbdata:/data/db
command: mongod --dbpath /data/db --logpath /data/db/log --noauth
node:
image: "node/node:8.9.4-alpine"
user: "node"
working_dir: /home/node/app
environment:
- NODE_ENV=production
- MONGO_URI=mongodb://mongodb:27017
volumes:
- ./:/home/node/app
expose:
- "8081"
networks:
- dbnet
depends_on:
- mongodb
links:
- mongodb
tty: true
command: "npm start"
networks:
dbnet:
volumes:
dbdata:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment