Skip to content

Instantly share code, notes, and snippets.

@bengrunfeld
Created August 16, 2020 16:31
Show Gist options
  • Save bengrunfeld/23d3cce2d4a78509278d74e226bcfe3d to your computer and use it in GitHub Desktop.
Save bengrunfeld/23d3cce2d4a78509278d74e226bcfe3d to your computer and use it in GitHub Desktop.
Docker Compose file for Hot Reloading with a Next.JS & MongoDB app
version: "3"
services:
web:
build:
context: .
dockerfile: Dockerfile
container_name: web
restart: always
volumes:
- ./:/usr/src/app
ports:
- "3000:3000"
depends_on:
- mongo
mongo:
container_name: mongo
image: mongo
restart: always
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