Skip to content

Commit

Permalink
Separate node_modules volumes for production and development
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourgreens committed Nov 18, 2024
1 parent c4b7be3 commit 870783f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
services:
prod-shell:
image: front-end-monorepo_prod:latest
volumes:
- node_modules-prod:/usr/src/node_modules
build:
context: ./
args:
Expand All @@ -13,7 +15,7 @@ services:
dev-shell:
image: front-end-monorepo_dev:latest
volumes:
- node_modules:/usr/src/node_modules
- node_modules-dev:/usr/src/node_modules
build:
context: ./
target: builder
Expand Down Expand Up @@ -58,4 +60,5 @@ services:
ports:
- "3003:3000"
volumes:
node_modules:
node_modules-dev:
node_modules-prod:
6 changes: 3 additions & 3 deletions packages/app-project/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
- ./pages:/usr/src/packages/app-project/pages
- ./src:/usr/src/packages/app-project/src
- ./stores:/usr/src/packages/app-project/stores
- node_modules:/usr/src/node_modules
- node_modules-dev:/usr/src/node_modules
storybook:
image: front-end-monorepo_dev:latest
entrypoint:
Expand All @@ -35,6 +35,6 @@ services:
- ./pages:/usr/src/packages/app-project/pages
- ./src:/usr/src/packages/app-project/src
- ./stores:/usr/src/packages/app-project/stores
- node_modules:/usr/src/node_modules
- node_modules-dev:/usr/src/node_modules
volumes:
node_modules:
node_modules-dev:

0 comments on commit 870783f

Please sign in to comment.