Forked from wesleybliss/docker-compose-node-mongo.yml
Created
December 15, 2017 12:29
-
-
Save wuxinglec/0bb492a77ee50f6e4905fea4f22a87e2 to your computer and use it in GitHub Desktop.
Docker Compose with example App & Mongo
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: | |
myapp: | |
build: . | |
container_name: "myapp" | |
image: debian/latest | |
environment: | |
- NODE_ENV=development | |
- FOO=bar | |
volumes: | |
- .:/var/www:rw | |
- /tmp/.X11-unix:/tmp/.X11-unix:rw | |
ports: | |
- 3000:3000 | |
- 9000:9000 | |
links: | |
- mongodb | |
depends_on: | |
- mongodb | |
mongodb: | |
image: mongo:latest | |
container_name: "mongodb" | |
environment: | |
- MONGO_DATA_DIR=/data/db | |
- MONGO_LOG_DIR=/dev/null | |
volumes: | |
- ./data/db:/data/db | |
ports: | |
- 27017:27017 | |
command: mongod --smallfiles --logpath=/dev/null # --quiet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment