Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chrisvasqm/61df817c29ba515351415e6c572d0e0c to your computer and use it in GitHub Desktop.
Save chrisvasqm/61df817c29ba515351415e6c572d0e0c to your computer and use it in GitHub Desktop.
Demostration docker-compose.yml file for a project with a Frontend + Backend+ Database setup to make local development easier
services:
db:
image: mongo:4.0-xenial
ports:
- 27017:27017
volumes:
- vidly:/data/db
api:
build: ./backend
ports:
- 3001:3001
environment:
DB_URL: mongodb://db/vidly
command: ./wait-for db:27017 && npm run db:up && npm start
web:
build: ./frontend
ports:
- 3000:3000
depends_on:
- api
volumes:
vidly:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment