made changes to compose
This commit is contained in:
@@ -11,11 +11,19 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./frontend
|
context: ./frontend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
command: >-
|
||||||
|
sh -lc "
|
||||||
|
if [ ! -d node_modules ] || [ -z \"$(ls -A node_modules 2>/dev/null)\" ]; then
|
||||||
|
echo '[frontend] Installing dependencies...';
|
||||||
|
npm install --silent;
|
||||||
|
fi;
|
||||||
|
npm start
|
||||||
|
"
|
||||||
environment:
|
environment:
|
||||||
- REACT_APP_API_URL=https://turftracker.kaspers.us/api
|
- REACT_APP_API_URL=https://turftracker.kaspers.us/api
|
||||||
volumes:
|
volumes:
|
||||||
- ./frontend:/app
|
- ./frontend:/app
|
||||||
- /app/node_modules
|
- frontend_node_modules:/app/node_modules
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
networks:
|
networks:
|
||||||
@@ -35,6 +43,14 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
command: >-
|
||||||
|
sh -lc "
|
||||||
|
if [ ! -d node_modules ] || [ -z \"$(ls -A node_modules 2>/dev/null)\" ]; then
|
||||||
|
echo '[backend] Installing production dependencies...';
|
||||||
|
npm install --only=production --silent;
|
||||||
|
fi;
|
||||||
|
npm start
|
||||||
|
"
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=development
|
- NODE_ENV=development
|
||||||
- DB_HOST=db
|
- DB_HOST=db
|
||||||
@@ -99,3 +115,5 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
|
frontend_node_modules:
|
||||||
|
backend_node_modules:
|
||||||
|
|||||||
0
scripts/deploy.sh
Normal file → Executable file
0
scripts/deploy.sh
Normal file → Executable file
Reference in New Issue
Block a user