Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.