@@ -50,6 +50,11 @@ services:
5050 container_name : leetcode-api-gateway
5151 ports :
5252 - ' 5000:5000'
53+ logging :
54+ driver : loki
55+ options :
56+ loki-url : " http://loki:3100/loki/api/v1/push"
57+ labels : " api-gateway"
5358 environment :
5459 - NODE_ENV=production
5560 - API_GATEWAY_PORT=5000
@@ -85,6 +90,11 @@ services:
8590 container_name : leetcode-users-service
8691 ports :
8792 - ' 5001:5001'
93+ logging :
94+ driver : loki
95+ options :
96+ loki-url : " http://loki:3100/loki/api/v1/push"
97+ labels : " users-service"
8898 environment :
8999 - NODE_ENV=production
90100 - API_GATEWAY_PORT=5000
@@ -120,6 +130,11 @@ services:
120130 container_name : leetcode-auth-service
121131 ports :
122132 - ' 5002:5002'
133+ logging :
134+ driver : loki
135+ options :
136+ loki-url : " http://loki:3100/loki/api/v1/push"
137+ labels : " auth-service"
123138 environment :
124139 - NODE_ENV=production
125140 - API_GATEWAY_PORT=5000
@@ -155,6 +170,11 @@ services:
155170 container_name : leetcode-problems-service
156171 ports :
157172 - ' 5003:5003'
173+ logging :
174+ driver : loki
175+ options :
176+ loki-url : " http://loki:3100/loki/api/v1/push"
177+ labels : " problems-service"
158178 environment :
159179 - NODE_ENV=production
160180 - API_GATEWAY_PORT=5000
@@ -188,6 +208,11 @@ services:
188208 container_name : leetcode-tags-service
189209 ports :
190210 - ' 5004:5004'
211+ logging :
212+ driver : loki
213+ options :
214+ loki-url : " http://loki:3100/loki/api/v1/push"
215+ labels : " tags-service"
191216 environment :
192217 - NODE_ENV=production
193218 - API_GATEWAY_PORT=5000
@@ -221,6 +246,11 @@ services:
221246 container_name : leetcode-companies-service
222247 ports :
223248 - ' 5005:5005'
249+ logging :
250+ driver : loki
251+ options :
252+ loki-url : " http://loki:3100/loki/api/v1/push"
253+ labels : " companies-service"
224254 environment :
225255 - NODE_ENV=production
226256 - API_GATEWAY_PORT=5000
@@ -254,6 +284,11 @@ services:
254284 container_name : leetcode-submissions-service
255285 ports :
256286 - ' 5006:5006'
287+ logging :
288+ driver : loki
289+ options :
290+ loki-url : " http://loki:3100/loki/api/v1/push"
291+ labels : " submissions-service"
257292 environment :
258293 - NODE_ENV=production
259294 - API_GATEWAY_PORT=5000
@@ -289,6 +324,11 @@ services:
289324 container_name : leetcode-execution-service
290325 ports :
291326 - ' 5007:5007'
327+ logging :
328+ driver : loki
329+ options :
330+ loki-url : " http://loki:3100/loki/api/v1/push"
331+ labels : " execution-service"
292332 environment :
293333 - NODE_ENV=production
294334 - API_GATEWAY_PORT=5000
@@ -354,6 +394,8 @@ services:
354394 ports :
355395 - " 3100:3100"
356396 restart : unless-stopped
397+ volumes :
398+ - ./loki-data:/loki
357399
358400volumes :
359401 pgdata :
0 commit comments