-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
117 lines (117 loc) · 2.76 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
117 lines (117 loc) · 2.76 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
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
version: "2.3"
services:
jaeger:
image: jaegertracing/all-in-one:latest
container_name: jaeger
ports:
- "16686:16686"
networks:
- local
etcd:
image: docker.io/bitnami/etcd:3
container_name: etcd
environment:
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_NAME=etcd
- ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd:2380
- ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
- ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379
- ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
- ETCD_INITIAL_CLUSTER=etcd=http://etcd:2380
- ETCD_INITIAL_CLUSTER_STATE=new
networks:
- local
ports:
- "2379:2379"
mysql:
image: mysql:8.0
container_name: dbpack-mysql
networks:
- local
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: "123456"
volumes:
- ../scripts/order.sql:/docker-entrypoint-initdb.d/order.sql:rw
- ../scripts/product.sql:/docker-entrypoint-initdb.d/product.sql:rw
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
dbpack1:
image: cectc/dbpack:latest
container_name: dbpack1
networks:
- local
ports:
- "13000:13000"
volumes:
- ../configs/config-aggregation.yaml:/config-aggregation.yaml
depends_on:
- jaeger
- etcd
- mysql
command: ["/dbpack", "start", "-c", "/config-aggregation.yaml"]
dbpack2:
image: cectc/dbpack:latest
container_name: dbpack2
networks:
- local
ports:
- "13307:13307"
volumes:
- ../configs/config-product.yaml:/config-product.yaml
depends_on:
- jaeger
- etcd
- mysql
command: ["/dbpack", "start", "-c", "/config-product.yaml"]
dbpack3:
image: cectc/dbpack:latest
container_name: dbpack3
networks:
- local
ports:
- "13308:13308"
volumes:
- ../configs/config-order.yaml:/config-order.yaml
depends_on:
- jaeger
- etcd
- mysql
command: ["/dbpack", "start", "-c", "/config-order.yaml"]
aggregation-svc:
build:
context: ${PWD}
dockerfile: ./scripts/aggregation/Dockerfile
container_name: aggregation-svc
networks:
- local
ports:
- "3000:3000"
depends_on:
- dbpack1
order-svc:
build:
context: ${PWD}
dockerfile: ./scripts/order/Dockerfile
container_name: order-svc
networks:
- local
ports:
- "3001:3001"
depends_on:
- dbpack3
product-svc:
build:
context: ${PWD}
dockerfile: ./scripts/product/Dockerfile
container_name: product-svc
networks:
- local
ports:
- "3002:3002"
depends_on:
- dbpack2
networks:
local:
name: dbpack