forked from mohamedsamara/mern-ecommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
44 lines (40 loc) · 993 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: '3'
services:
client:
build: client
container_name: client
ports:
- '8080:8080'
networks:
- app-network
server:
build: server
container_name: server
environment:
- PORT=3000
- BASE_API_URL=api
- CLIENT_URL=http://localhost:8080
- JWT_SECRET=update_your_JWT_secret
- MONGO_URI=mongodb://mongo:27017/mern_ecommerce # Default Mongo URL & DB name when running project locally
ports:
- '3000:3000'
command: [
'sh',
'-c',
'npm run seed:db [email protected] admin123 && npm start'
] # Default email and password arguments to database seed script - update your admin email and password
depends_on:
- mongo
networks:
- app-network
mongo:
image: mongo:latest
container_name: mongodb
command: mongod --quiet --logpath /dev/null
ports:
- '27017:27017'
networks:
- app-network
networks:
app-network:
driver: bridge