-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
115 lines (105 loc) · 3.32 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
version: "3.3"
services:
zookeeper:
image: bitnami/zookeeper:3.5
container_name: zookeeper
platform: linux/amd64
ports:
- 2181:2181
volumes:
- zookeeper_data:/bitnami
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: bitnami/kafka:3.5
container_name: kafka
ports:
- 29092:29092
- 9092:9092
volumes:
- kafka_data:/bitnami
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT,CONTROLLER:PLAINTEXT
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,PLAINTEXT_HOST://:29092,CONTROLLER://:9093
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
- KAFKA_CFG_CONTROLLER_NANES=CONTROLLER
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
depends_on:
- zookeeper
mysql:
image: mysql
container_name: mysql
ports:
- 3306:3306
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- TZ=Asia/Seoul
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
volumes:
- ./db/conf.d:/etc/mysql/conf.d
- ./db/data:/var/lib/mysql
- ./db/initdb.d:/docker-entrypoint-initdb.d
redis:
image: redis
container_name: redis
ports:
- 6379:6379
api-gateway-service:
image: .../api-gateway-service:0.0.1
container_name: api-gateway-service
ports:
- 8089:8089
environment:
- eureka.client.serviceUrl.defaultZone=http://service-discovery:8061/eureka/
depends_on:
- service-discovery
service-discovery:
image: .../service-discovery:0.0.1
container_name: service-discovery
ports:
- 8061:8061
order-service:
image: .../order-service:0.0.1
container_name: order-service
environment:
- eureka.client.serviceUrl.defaultZone=http://service-discovery:8061/eureka/
- spring.datasource.url=jdbc:mysql://mysql:3306/order_service?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnection=true
- spring.data.redis.url=redis://redis:6379/redis
- spring.kafka.bootstrap-servers=kafka://kafka:9092
depends_on:
- service-discovery
- mysql
- kafka
item-service:
image: .../item-service:0.0.1
container_name: item-service
environment:
- eureka.client.serviceUrl.defaultZone=http://service-discovery:8061/eureka/
- spring.datasource.url=jdbc:mysql://mysql:3306/item_service?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnection=true
- spring.data.redis.url=redis://redis:6379/redis
- spring.kafka.bootstrap-servers=kafka://kafka:9092
depends_on:
- service-discovery
- mysql
- kafka
auth-service:
image: .../auth-service:0.0.1
container_name: auth-service
environment:
- eureka.client.serviceUrl.defaultZone=http://service-discovery:8061/eureka/
- spring.datasource.url=jdbc:mysql://mysql:3306/auth_service?serverTimezone=UTC&characterEncoding=UTF-8&autoReconnection=true
- spring.data.redis.url=redis://redis:6379/redis
- spring.kafka.bootstrap-servers=kafka://kafka:9092
depends_on:
- service-discovery
- mysql
- kafka
volumes:
zookeeper_data:
driver: local
kafka_data:
driver: local