-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
158 lines (143 loc) · 4.19 KB
/
docker-compose.yaml
File metadata and controls
158 lines (143 loc) · 4.19 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
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
services:
## MySQL Docker Compose Config
mysql-order-service:
container_name: mysql-order-service
image: mysql:8.3.0
environment:
MYSQL_DATABASE: order_service
MYSQL_ROOT_PASSWORD: root
restart: unless-stopped
mysql-inventory-service:
container_name: mysql-inventory-service
image: mysql:8.3.0
environment:
MYSQL_DATABASE: inventory_service
MYSQL_ROOT_PASSWORD: root
restart: unless-stopped
## Mongo Docker Compose Config
mongo-product-service:
container_name: mongo-product-service
image: mongo:7.0.8
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
restart: unless-stopped
ports:
- "27017:27017"
expose:
- "27017"
keycloak-microservice:
container_name: keycloak-microservice
image: quay.io/keycloak/keycloak
ports:
- "8080:8080"
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
command: start-dev
zipkin-microservice:
image: openzipkin/zipkin
container_name: zipkin-microservice
ports:
- "9411:9411"
kafka:
container_name: kafka
image: 'bitnami/kafka:latest'
ports:
- "9092:9092"
environment:
KAFKA_CFG_NODE_ID: 0
KAFKA_CFG_PROCESS_ROLES: controller,broker
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 0@kafka:9093
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
prometheus:
container_name: prometheus
image: bitnami/prometheus:2.51.2
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
container_name: grafana
image: grafana/grafana:10.4.2
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- ./grafana:/var/lib/grafana
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
## Eureka Server
discovery-server:
image: mhmmdnaufal/microservice-discovery-server:latest
container_name: discovery-server
ports:
- "8761:8761"
environment:
SPRING_PROFILES_ACTIVE: docker
depends_on:
- zipkin-microservice
api-gateway:
image: mhmmdnaufal/microservice-api-gateway:latest
container_name: api-gateway
ports:
- "8181:8080"
expose:
- "8181"
environment:
SPRING_PROFILES_ACTIVE: docker
depends_on:
- zipkin-microservice
- keycloak-microservice
- discovery-server
## Product-Service Docker Compose Config
product-service:
container_name: product-service
image: mhmmdnaufal/microservice-product-service:latest
environment:
SPRING_PROFILES_ACTIVE: docker
SPRING_DATA_MONGODB_URI: mongodb://root:root@mongo-product-service:27017/product_service?authSource=admin
depends_on:
- mongo-product-service
- discovery-server
- api-gateway
## Order-Service Docker Compose Config
order-service:
container_name: order-service
image: mhmmdnaufal/microservice-order-service:latest
environment:
SPRING_PROFILES_ACTIVE: docker
SPRING_DATASOURCE_URL: jdbc:mysql://mysql-order-service:3306/order_service
depends_on:
- mysql-order-service
- kafka
- zipkin-microservice
- discovery-server
- api-gateway
## Inventory-Service Docker Compose Config
inventory-service:
container_name: inventory-service
image: mhmmdnaufal/microservice-inventory-service:latest
environment:
SPRING_PROFILES_ACTIVE: docker
SPRING_DATASOURCE_URL: jdbc:mysql://mysql-inventory-service:3306/inventory_service
depends_on:
- mysql-inventory-service
- discovery-server
- api-gateway
## Notification-Service Docker Compose Config
notification-service:
container_name: notification-service
image: mhmmdnaufal/microservice-notification-service:latest
environment:
SPRING_PROFILES_ACTIVE: docker
depends_on:
- zipkin-microservice
- kafka
- discovery-server
- api-gateway