-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (58 loc) · 1.32 KB
/
Copy pathdocker-compose.yml
File metadata and controls
63 lines (58 loc) · 1.32 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
version: "3.9"
services:
auth-service:
build:
context: .
dockerfile: services/auth/Dockerfile
environment:
- PORT=4001
- JWT_SECRET=${JWT_SECRET:-change-me-in-production}
ports:
- "4001:4001"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:4001/health"]
interval: 10s
timeout: 3s
retries: 3
product-service:
build:
context: .
dockerfile: services/product/Dockerfile
environment:
- PORT=4002
deploy:
replicas: 3
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:4002/health"]
interval: 10s
timeout: 3s
retries: 3
order-service:
build:
context: .
dockerfile: services/order/Dockerfile
environment:
- PORT=4003
- PRODUCT_SERVICE_URL=http://product-service:4002
ports:
- "4003:4003"
depends_on:
- product-service
gateway:
build:
context: .
dockerfile: services/gateway/Dockerfile
environment:
- PORT=4000
- AUTH_URL=http://auth-service:4001
- ORDER_URL=http://order-service:4003
- PRODUCT_URLS=http://product-service:4002
ports:
- "4000:4000"
depends_on:
- auth-service
- product-service
- order-service
networks:
default:
name: microservices-net