-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
111 lines (104 loc) · 2.87 KB
/
docker-compose.yml
File metadata and controls
111 lines (104 loc) · 2.87 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
services:
kafka:
image: apache/kafka:3.7.0
ports:
- "9092:9092"
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@localhost:9093
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
healthcheck:
test: ["CMD-SHELL", "/opt/kafka/bin/kafka-broker-api-versions.sh --bootstrap-server localhost:9092 || exit 1"]
interval: 5s
timeout: 10s
retries: 15
start_period: 30s
order-api:
build: .
command: ["order-api.jar"]
ports:
- "8081:8081"
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:9092
SERVER_ADDRESS: "0.0.0.0"
depends_on:
kafka:
condition: service_healthy
order-validator:
build: .
command: ["order-validator.jar"]
ports:
- "8082:8082"
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:9092
SERVER_ADDRESS: "0.0.0.0"
depends_on:
kafka:
condition: service_healthy
inventory-service:
build: .
command: ["inventory-service.jar"]
ports:
- "8083:8083"
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:9092
SERVER_ADDRESS: "0.0.0.0"
depends_on:
kafka:
condition: service_healthy
payment-service:
build: .
command: ["payment-service.jar"]
ports:
- "8084:8084"
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:9092
SERVER_ADDRESS: "0.0.0.0"
depends_on:
kafka:
condition: service_healthy
notification-service:
build: .
command: ["notification-service.jar"]
ports:
- "8085:8085"
environment:
SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:9092
SERVER_ADDRESS: "0.0.0.0"
depends_on:
kafka:
condition: service_healthy
prometheus:
image: prom/prometheus:v2.48.0
ports:
- "9090:9090"
volumes:
- "./prometheus-docker.yml:/etc/prometheus/prometheus.yml:ro"
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
depends_on:
- order-api
- order-validator
- inventory-service
- payment-service
- notification-service
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
volumes:
- "./grafana/provisioning/datasources/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml:ro"
depends_on:
- prometheus