-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (81 loc) · 1.97 KB
/
Copy pathdocker-compose.yml
File metadata and controls
86 lines (81 loc) · 1.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
services:
user-service:
build:
context: ./services/user-service
dockerfile: Dockerfile
ports:
- "5000:5000"
environment:
- APP_VERSION=1.0.0
- ENVIRONMENT=development
networks:
- app-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:5000/health"]
interval: 15s
timeout: 10s
retries: 5
start_period: 30s
restart: on-failure
product-service:
build:
context: ./services/product-service
dockerfile: Dockerfile
ports:
- "5001:5001"
environment:
- APP_VERSION=1.0.0
- ENVIRONMENT=development
networks:
- app-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:5001/health"]
interval: 15s
timeout: 10s
retries: 5
start_period: 30s
restart: on-failure
order-service:
build:
context: ./services/order-service
dockerfile: Dockerfile
ports:
- "5002:5002"
environment:
- APP_VERSION=1.0.0
- ENVIRONMENT=development
- USER_SERVICE_URL=http://user-service:5000
- PRODUCT_SERVICE_URL=http://product-service:5001
depends_on:
user-service:
condition: service_healthy
product-service:
condition: service_healthy
networks:
- app-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:5002/health"]
interval: 15s
timeout: 10s
retries: 5
start_period: 30s
restart: on-failure
api-gateway:
build:
context: ./services/api-gateway
dockerfile: Dockerfile
ports:
- "80:80"
depends_on:
user-service:
condition: service_healthy
product-service:
condition: service_healthy
order-service:
condition: service_healthy
networks:
- app-network
restart: on-failure
networks:
app-network:
driver: bridge