-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
202 lines (191 loc) Β· 5.97 KB
/
docker-compose.yaml
File metadata and controls
202 lines (191 loc) Β· 5.97 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
services:
# π FRONTEND SERVICE
frontend:
build: ./frontend
image: prograbyte_frontend
ports:
- "5173:5173"
depends_on:
- api-gateway
environment:
- VITE_BASE_API_URL=http://api-gateway:5000/api
- VITE_BASE_URL=http://api-gateway:5000
- VITE_GOOGLE_CLIENT_ID=value
- VITE_STRIPE_PUBLIC_KEY=value
networks:
- app-network
# π API GATEWAY
api-gateway:
build: ./api-gateway
image: prograbyte_api_gateway
ports:
- "5000:5000"
depends_on:
- auth-service
- user-service
- blog-service
- course-service
- live-service
- notification-service
- payment-service
environment:
- AUTH_SERVICE_URL=http://auth-service:5001
- USER_SERVICE_URL=http://user-service:5002
- COURSE_SERVICE_URL=http://course-service:5003
- BLOG_SERVICE_URL=http://blog-service:5004
- LIVE_SERVICE_URL=http://live-service:5005
- NOTIFICATION_SERVICE_URL=http://notification-service:5006
- PAYMENT_SERVICE_URL=http://payment-service:5007
- API_GATEWAY_KEY=996940d97b77a0bb9f7dbfbf6e8d8af5dfa6ca47250a3b2846d0272ca6eb741f
- JWT_SECRET=d45659e5d171e2ed2ba45ff0fd76eb68a8e627576e8529be335cbd192973b21cf1c34702b3ff9afab6bde6454bd05abec322741f95bf4242c8baffaf48ed2a18
networks:
- app-network
# π AUTH SERVICE
auth-service:
build: ./backend/auth-service
image: prograbyte_auth_service
ports:
- "5001:5001"
environment:
- MONGO_URI=mongodb://mongo:27017/auth-service
- JWT_ACCESS_SECRET=d45659e5d171e2ed2ba45ff0fd76eb68a8e627576e8529be335cbd192973b21cf1c34702b3ff9afab6bde6454bd05abec322741f95bf4242c8baffaf48ed2a18
- JWT_REFRESH_SECRET=71a0ffce065819b7147f467d28a0f7cf4181e2dd7f731d763a8cde357d9978519b11f3a68e60842c7a96a9879c04cebeac4a71f50ad9fd89752da5888ca4805d
- FRONTEND_URL=http://frontend:5173
- REDIS_URL=redis://redis:6379
- RABBITMQ_URL=amqp://rabbitmq
- API_GATEWAY_KEY=996940d97b77a0bb9f7dbfbf6e8d8af5dfa6ca47250a3b2846d0272ca6eb741f
depends_on:
- mongo
- rabbitmq
networks:
- app-network
# π USER SERVICE
user-service:
build: ./backend/user-service
image: prograbyte_user_service
ports:
- "5002:5002"
environment:
- MONGO_URI=mongodb://mongo:27017/user-service
- GOOGLE_CLIENT_ID=value
- GOOGLE_CLIENT_SECRET=value
- KAFKA_BROKER=kafka:9092
- BACKEND_URL=http://api-gateway:5000/api
- JWT_ACCESS_SECRET=d45659e5d171e2ed2ba45ff0fd76eb68a8e627576e8529be335cbd192973b21cf1c34702b3ff9afab6bde6454bd05abec322741f95bf4242c8baffaf48ed2a18
- JWT_REFRESH_SECRET=71a0ffce065819b7147f467d28a0f7cf4181e2dd7f731d763a8cde357d9978519b11f3a68e60842c7a96a9879c04cebeac4a71f50ad9fd89752da5888ca4805d
- FRONTEND_URL=http://frontend:5173
- RABBITMQ_URL=amqp://rabbitmq
- API_GATEWAY_KEY=996940d97b77a0bb9f7dbfbf6e8d8af5dfa6ca47250a3b2846d0272ca6eb741f
depends_on:
- mongo
- rabbitmq
networks:
- app-network
# π COURSE SERVICE
course-service:
build: ./backend/course-service
image: prograbyte_course_service
ports:
- "5003:5003"
environment:
- MONGO_URI=mongodb://mongo:27017/course-service
- RABBITMQ_URL=amqp://rabbitmq
- KAFKA_BROKER=kafka:9092
- CLOUDINARY_CLOUD_NAME=value
- CLOUDINARY_API_KEY=value
- CLOUDINARY_API_SECRET=value
- STRIPE_SECRET_KEY=value
- API_GATEWAY_KEY=996940d97b77a0bb9f7dbfbf6e8d8af5dfa6ca47250a3b2846d0272ca6eb741f
- TOKEN_SECRET=786d1bc21c5414a2f886bddad740386fe7d13f8efdde632c117846c769eaac6a4b13db59b26caac956786b3b9bed97099f991c8ef45ef6f9bdceeede030f8c29
depends_on:
- mongo
- rabbitmq
networks:
- app-network
# π BLOG SERVICE
blog-service:
build: ./backend/blog-service
image: prograbyte_blog_service
ports:
- "5004:5004"
environment:
- MONGO_URI=mongodb://mongo:27017/blog-service
- RABBITMQ_URL=amqp://rabbitmq
- CLOUDINARY_CLOUD_NAME=value
- CLOUDINARY_API_KEY=value
- CLOUDINARY_API_SECRET=value
- API_GATEWAY_KEY=996940d97b77a0bb9f7dbfbf6e8d8af5dfa6ca47250a3b2846d0272ca6eb741f
depends_on:
- mongo
- rabbitmq
networks:
- app-network
# π LIVE STREAMING SERVICE
live-service:
build: ./backend/live-service
image: prograbyte_live_service
ports:
- "5005:5005"
environment:
- API_GATEWAY_URL=http://api-gateway:5000
- API_GATEWAY_KEY=996940d97b77a0bb9f7dbfbf6e8d8af5dfa6ca47250a3b2846d0272ca6eb741f
- LIVE_SERVICE_URL=http://nginx-rtmp:1935
- RABBITMQ_URL=amqp://rabbitmq
depends_on:
- nginx-rtmp
- rabbitmq
networks:
- app-network
# π NGINX-RTMP (For Live Streaming)
nginx-rtmp:
image: alfg/nginx-rtmp
ports:
- "1935:1935"
- "8080:8080"
volumes:
- ./backend/live-service/hls:/hls
networks:
- app-network
# π FFMPEG (For Encoding)
ffmpeg:
image: jrottenberg/ffmpeg:latest
command: ["tail", "-f", "/dev/null"]
depends_on:
- nginx-rtmp
restart: always
privileged: true
networks:
- app-network
# π NOTIFICATION SERVICE
notification-service:
build: ./backend/notification-service
image: prograbyte_notification_service
ports:
- "5006:5006"
depends_on:
- redis
- rabbitmq
environment:
- EMAIL_USER=value
- EMAIL_PASS=value
- API_GATEWAY_KEY=996940d97b77a0bb9f7dbfbf6e8d8af5dfa6ca47250a3b2846d0272ca6eb741f
- RABBITMQ_URL=amqp://rabbitmq
networks:
- app-network
payment-service:
build: ./backend/payment-service
image: prograbyte_payment_service
ports:
- "5007:5007"
depends_on:
- redis
- rabbitmq
environment:
- MONGO_URI=mongodb://mongo:27017/blog-service
- RABBITMQ_URL=amqp://rabbitmq
- FRONTEND_URL=http://frontend:5173
networks:
- app-network
networks:
app-network:
driver: bridge