made changes to compose
This commit is contained in:
@@ -11,11 +11,19 @@ services:
|
||||
build:
|
||||
context: ./frontend
|
||||
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:
|
||||
- REACT_APP_API_URL=https://turftracker.kaspers.us/api
|
||||
volumes:
|
||||
- ./frontend:/app
|
||||
- /app/node_modules
|
||||
- frontend_node_modules:/app/node_modules
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
@@ -35,6 +43,14 @@ services:
|
||||
build:
|
||||
context: ./backend
|
||||
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:
|
||||
- NODE_ENV=development
|
||||
- DB_HOST=db
|
||||
@@ -99,3 +115,5 @@ services:
|
||||
|
||||
volumes:
|
||||
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