Skip to content

Instantly share code, notes, and snippets.

@unreadable
Last active February 8, 2021 19:10
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 unreadable/8a5b53c3760a323273303ff69d60b4a3 to your computer and use it in GitHub Desktop.
Save unreadable/8a5b53c3760a323273303ff69d60b4a3 to your computer and use it in GitHub Desktop.
Docker compose file for node and mongo
# change mongo url to mongodb://mongo:27017
version: "3"
services:
app:
container_name: express-api
restart: always
build: .
ports:
- '3000:3000'
networks:
- express-mongo
depends_on:
- mongo
mongo:
container_name: mongo
image: mongo
ports:
- '27017:27017'
networks:
- express-mongo
networks:
express-mongo:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment