Skip to content

Commit 42216f1

Browse files
committed
docker compose update for pre build images
1 parent 8a42672 commit 42216f1

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

docker-compose.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
11
services:
22
server:
3-
build: ./backend
3+
image: harshpatil20/uber-server:latest # Use pre-built backend image
44
ports:
55
- "3000:3000"
6-
volumes:
7-
- ./backend:/app
8-
- /app/node_modules # Prevent overwriting node_modules
96
env_file:
107
- ./backend/.env # Load environment variables
118
environment:
12-
- DB_CONNECT=mongodb://mongo:27017/uberdb # Override DB_CONNECT without changing code
9+
- DB_CONNECT=mongodb://mongo:27017/uberdb
1310
depends_on:
1411
- mongo
1512
networks:
1613
- app-network
1714

1815
client:
19-
build: ./frontend
16+
image: harshpatil20/uber-client:latest # Use pre-built frontend image
2017
ports:
21-
- "5173:5173" # Updated to 5137
22-
volumes:
23-
- ./frontend:/app
24-
- /app/node_modules
18+
- "5173:5173"
2519
environment:
26-
- VITE_BASE_URL=http://localhost:3000
20+
- VITE_BASE_URL=http://server:3000 # Use service name instead of localhost
2721
depends_on:
2822
- server
2923
networks:

0 commit comments

Comments
 (0)