forked from aliyun/alibabacloud-microservice-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-ali.yml
174 lines (165 loc) · 5.18 KB
/
docker-compose-ali.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
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
version: "3"
services:
nacos:
hostname: nacos
image: nacos/nacos-server:latest
container_name: nacos-standalone
environment:
- PREFER_HOST_MODE=hostname
- MODE=standalone
ports:
- "8848:8848"
# currency-mysql:
# image: mysql:5.6
# ports:
# - 3306
# command: [
# --character-set-server=utf8mb4,
# --collation-server=utf8mb4_unicode_ci
# ]
# environment:
# MYSQL_ROOT_PASSWORD: currencyservice
# MYSQL_DATABASE: currency
checkout-mysql:
image: mysql:5.6
ports:
- 3306
command: [
--character-set-server=utf8mb4,
--collation-server=utf8mb4_unicode_ci
]
environment:
MYSQL_ROOT_PASSWORD: checkoutservice
MYSQL_DATABASE: checkout
product-mysql:
image: mysql:5.6
ports:
- 3306
command: [
--character-set-server=utf8mb4,
--collation-server=utf8mb4_unicode_ci
]
environment:
MYSQL_ROOT_PASSWORD: productservice
MYSQL_DATABASE: product
cart-redis:
image: redis:latest
ports:
- 6379:6379
frontend:
build: ./src/frontend
image: registry.cn-shanghai.aliyuncs.com/microservice_demo/frontend:1.0.0-SNAPSHOT
container_name: frontend
# restart: always
environment:
- dubbo.registry.address=nacos://nacos-server:8848
- spring.cloud.nacos.discovery.server-addr=nacos-server:8848
- spring.cloud.nacos.config.server-addr=nacos-server:8848
ports:
- "8080:8080"
depends_on:
- "nacos"
cartservice:
build: ./src/cartservice
image: registry.cn-shanghai.aliyuncs.com/microservice_demo/cartservice:1.0.0-SNAPSHOT
container_name: cartservice
environment:
- dubbo.registry.address=nacos://nacos-server:8848
- spring.cloud.nacos.discovery.server-addr=nacos-server:8848
- spring.cloud.nacos.config.server-addr=nacos-server:8848
depends_on:
- "nacos"
- "cart-redis"
checkoutservice:
build: ./src/checkoutservice
image: registry.cn-shanghai.aliyuncs.com/microservice_demo/checkoutservice:1.0.0-SNAPSHOT
container_name: checkoutservice
environment:
- dubbo.registry.address=nacos://nacos-server:8848
- spring.cloud.nacos.discovery.server-addr=nacos-server:8848
- spring.cloud.nacos.config.server-addr=nacos-server:8848
depends_on:
- "nacos"
- "checkout-mysql"
prdoctservice:
build: ./src/productservice
image: registry.cn-shanghai.aliyuncs.com/microservice_demo/productservice:1.0.0-SNAPSHOT
container_name: productservice
environment:
- dubbo.registry.address=nacos://nacos-server:8848
- spring.cloud.nacos.discovery.server-addr=nacos-server:8848
- spring.cloud.nacos.config.server-addr=nacos-server:8848
depends_on:
- "nacos"
- "product-mysql"
loadgenerator:
build: ./src/loadgenerator
image: registry.cn-shanghai.aliyuncs.com/microservice_demo/loadgenerator:1.0.0-SNAPSHOT
container_name: loadgenerator
# adservice:
# build: ./src/adservice
# image: adservice:1.0.0-SNAPSHOT
# container_name: adservice
# environment:
# - dubbo.registry.address=nacos://nacos-server:8848
# - spring.cloud.nacos.discovery.server-addr=nacos-server:8848
# - spring.cloud.nacos.discovery.server-addr=nacos-server:8848
# depends_on:
# - "nacos"
#
#
#
# currencyservice:
# build: ./src/productservice
# image: currencyservice:1.0.0-SNAPSHOT
# container_name: currencyservice
# environment:
# - dubbo.registry.address=nacos://nacos-server:8848
# - spring.cloud.nacos.discovery.server-addr=nacos-server:8848
# - spring.cloud.nacos.discovery.server-addr=nacos-server:8848
# depends_on:
# - "nacos"
#
# emailservice:
# build: ./src/emailservice
# image: emailservice:1.0.0-SNAPSHOT
# container_name: emailservice
# environment:
# - dubbo.registry.address=nacos://nacos-server:8848
# - spring.cloud.nacos.discovery.server-addr=nacos-server:8848
# - spring.cloud.nacos.discovery.server-addr=nacos-server:8848
# depends_on:
# - "nacos"
#
# paymentservice:
# build: ./src/paymentservice
# image: paymentservice:1.0.0-SNAPSHOT
# container_name: paymentservice
# environment:
# - dubbo.registry.address=nacos://nacos-server:8848
# - spring.cloud.nacos.discovery.server-addr=nacos-server:8848
# - spring.cloud.nacos.discovery.server-addr=nacos-server:8848
# depends_on:
# - "nacos"
#
# recomendationservice:
# build: ./src/recomendationservice
# image: recomendationservice:1.0.0-SNAPSHOT
# container_name: recomendationservice
# environment:
# - dubbo.registry.address=nacos://nacos-server:8848
# - spring.cloud.nacos.discovery.server-addr=nacos-server:8848
# - spring.cloud.nacos.discovery.server-addr=nacos-server:8848
# depends_on:
# - "nacos"
#
# shippingservice:
# build: ./src/shippingservice
# image: shippingservice:1.0.0-SNAPSHOT
# container_name: shippingservice
# environment:
# - dubbo.registry.address=nacos://nacos-server:8848
# - spring.cloud.nacos.discovery.server-addr=nacos-server:8848
# - spring.cloud.nacos.discovery.server-addr=nacos-server:8848
# depends_on:
# - "nacos"