Skip to content

Instantly share code, notes, and snippets.

@knowsuchagency
Created January 19, 2019 09:41
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 knowsuchagency/4e2148d80599160f6c399bbdec0053ef to your computer and use it in GitHub Desktop.
Save knowsuchagency/4e2148d80599160f6c399bbdec0053ef to your computer and use it in GitHub Desktop.
shared volumes on docker-compose
volumes:
shared:
driver: local
driver_opts:
type: none
o: bind
device: "${PWD}/shared"
services:
api:
build: ./packages/api
command: npm run start
volumes:
- ./packages/api:/usr/packages/api
- shared:/usr/packages/api/src/shared
web:
build: ./packages/web
command: npm run start
volumes:
- ./packages/api:/usr/packages/web
- shared:/usr/packages/web/src/shared
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment