Instantly share code, notes, and snippets.

Embed
What would you like to do?
version: '3'
services:
frontend:
# image: node:9.11
container_name: "frontend"
build: ./frontend/
ports:
- 8888:3000
volumes:
- ./frontend/project:/home/node/project
command: yarn start
backend:
# image: node:9.11
container_name: "backend"
build: ./backend/
ports:
- 8080:3000
volumes:
- ./backend/project:/home/node/project
depends_on:
- database
command: yarn start
database:
restart: always
image: mongo:latest
container_name: "database"
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
volumes:
- ./data/:/data/db
ports:
- 27017:27017
command: mongod --logpath=/dev/null --smallfiles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment