-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathdocker-compose.yml
48 lines (44 loc) · 1021 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
45
46
47
48
version: "3"
services:
mongodb:
image: mongo:latest
container_name: mongodb-container
ports:
- "127.0.0.1:27017:27017" # Port mapping to localhost
volumes:
- mongodb-data:/data/db # Mount a local directory into the container
logging:
driver: none
redis:
image: redis:latest
container_name: redis-container
ports:
- "127.0.0.1:6379:6379" # Port mapping to localhost
logging:
driver: none
react-app:
build:
context: ./client
dockerfile: Dockerfile
container_name: reactjs-container
ports:
- "3000:3000"
depends_on:
- nodejs-app
environment:
- NODE_ENV=development
nodejs-app:
build:
context: ./server
dockerfile: Dockerfile
container_name: nodejs-api-container
ports:
- "5000:5000"
- "3002:3002"
depends_on:
- mongodb
- redis
# command: ["pm2-runtime", "start", "npm", "--", "start"]
command: ["npm", "start"]
volumes:
mongodb-data: