-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (64 loc) · 1.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (64 loc) · 1.3 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
version: '3.8'
services:
# 1. MongoDB Database
mongodb:
image: mongo:6.0
container_name: tasksphere-mongodb
restart: always
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
networks:
- tasksphere-network
# 2. Redis Cache & Messaging Store
redis:
image: redis:7.0-alpine
container_name: tasksphere-redis
restart: always
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- tasksphere-network
# 3. Node Express API Server
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: tasksphere-backend
restart: always
ports:
- "5000:5000"
env_file:
- ./backend/.env
environment:
- PORT=5000
- MONGODB_URI=mongodb://mongodb:27017/tasksphere
- REDIS_URL=redis://redis:6379
- NODE_ENV=production
depends_on:
- mongodb
- redis
networks:
- tasksphere-network
# 4. React Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: tasksphere-frontend
restart: always
ports:
- "80:80"
depends_on:
- backend
networks:
- tasksphere-network
volumes:
mongodb_data:
redis_data:
networks:
tasksphere-network:
driver: bridge