Last active
March 14, 2019 12:18
-
-
Save lukeandersen/9c55e5e3a46914b8064980748987325e to your computer and use it in GitHub Desktop.
Basic docker compose for a local Node and Mongo app
This file contains hidden or 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: "3" | |
| services: | |
| app: | |
| container_name: this-app | |
| restart: always | |
| build: ../path-to-this-app/ | |
| volumes: | |
| - .:/src/app | |
| - /src/app/node_modules | |
| ports: | |
| - "3001:3001" | |
| links: | |
| - mongo | |
| environment: | |
| WAIT_HOSTS: mongo:27017 | |
| mongo: | |
| container_name: mongo | |
| image: mongo | |
| volumes: | |
| - ./data:/data/db | |
| ports: | |
| - "27017:27017" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment