Skip to content

Commit 790e646

Browse files
Remove node_modules volume and add install pre-script in package.json
1 parent b0692d0 commit 790e646

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

docker-compose-debug.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ volumes:
44
dbvolume:
55
ipython:
66
static_volume:
7-
node_module:
87

98
services:
109
db:
@@ -49,8 +48,7 @@ services:
4948
build: ./frontend
5049
volumes:
5150
- ./frontend/:/usr/src/app/
52-
- node_module:/usr/src/app/frontend/node_modules/
53-
command: bash -c "npm install && npm start"
51+
command: bash -c "npm start"
5452
depends_on:
5553
- web
5654
ports:

frontend/.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
node_modules

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"video.js": "^7.8.2"
2727
},
2828
"scripts": {
29+
"prestart": "if [ ! -d node_modules ]; then npm install; fi",
2930
"start": "react-scripts start",
3031
"build": "react-scripts build",
3132
"test": "react-scripts test",

0 commit comments

Comments
 (0)