-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
145 lines (137 loc) · 2.98 KB
/
docker-compose.yml
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
version: "3.8"
services:
tracing-service:
container_name: zipkin
image: openzipkin/zipkin
ports:
- "9411:9411"
deploy:
resources:
limits:
memory: 500M
cpus: "1"
environment:
TRACING_ENABLED: true
storage-service:
container_name: mysql
image: mysql
environment:
MYSQL_USER: malware
MYSQL_DATABASE: ms_arch
MYSQL_PASSWORD: super-secret-pwd
MYSQL_ROOT_PASSWORD: password
healthcheck:
test: [ "CMD", "mysqladmin" , "ping", "-h", "localhost" ]
interval: 10s
timeout: 10s
retries: 5
cache-service:
container_name: redis
image: redis
ports:
- ":6379"
deploy:
resources:
limits:
cpus: "1"
memory: 100M
environment:
TRACING_ENABLED: "true"
discovery-service:
container_name: consul
image: hashicorp/consul
ports:
- "8500:8500"
deploy:
resources:
limits:
cpus: "0.5"
memory: 500M
api-gateway:
image: api-gateway
ports:
- "8000:8000"
build:
context: api-gateway
depends_on:
- storage-service
deploy:
resources:
limits:
cpus: "1"
restart_policy:
condition: on-failure
max_attempts: 10
delay: 20s
environment:
SERVER_PORT: 8000
HTTP2_ENABLED: false
SSL_ENABLED: false
KEYSTORE_PATH: /data/keystore.p12
KEYSTORE_PASSWORD:
ACTIVE_PROFILE: "prod"
volumes:
- ./keystore.p12:/data/keystore.p12
auth-service:
image: auth-service
build:
context: auth-service
ports:
- ":8001"
deploy:
replicas: 1
resources:
limits:
memory: 500M
cpus: "1"
restart_policy:
condition: on-failure
max_attempts: 10
delay: 20s
healthcheck:
test: [ "CMD", "curl", "--fail", "--silent", "http://auth-service:8001/actuator/health" ]
interval: 5s
timeout: 10s
retries: 5
depends_on:
- storage-service
- tracing-service
- cache-service
- discovery-service
environment:
SERVER_PORT: 80
TRACING_ENABLED: "true"
DISCOVERY_ENABLED: "true"
ACTIVE_PROFILE: "prod"
product-service:
image: product-service
build:
context: product-service
deploy:
replicas: 1
resources:
limits:
memory: 500M
cpus: "1"
restart_policy:
condition: on-failure
max_attempts: 10
delay: 20s
environment:
SERVER_PORT: 80
TRACING_ENABLED: "true"
DISCOVERY_ENABLED: "true"
ACTIVE_PROFILE: "prod"
healthcheck:
test: [ "CMD", "curl", "--fail", "--silent", "http://auth-service:8001/actuator/health" ]
interval: 5s
timeout: 10s
retries: 5
depends_on:
- storage-service
- tracing-service
- cache-service
- discovery-service
volumes:
mysql_data:
name: ms-arch