Skip to content

Instantly share code, notes, and snippets.

@itto-ki
Last active July 1, 2018 07:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itto-ki/f1da8a2e4bc697870988241df76035b1 to your computer and use it in GitHub Desktop.
Save itto-ki/f1da8a2e4bc697870988241df76035b1 to your computer and use it in GitHub Desktop.
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