-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (68 loc) · 1.71 KB
/
docker-compose.yml
File metadata and controls
73 lines (68 loc) · 1.71 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
services:
redis:
image: redis:alpine
ports:
- "6379:6379"
command: redis-server
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
networks:
- flash-sale-network
redpanda:
image: docker.redpanda.com/redpandadata/redpanda:latest
command:
- redpanda
- start
- --mode dev-container
- --kafka-addr internal://0.0.0.0:9092,external://0.0.0.0:19092
- --advertise-kafka-addr internal://redpanda:9092,external://localhost:19092
- --pandaproxy-addr internal://0.0.0.0:8082,external://0.0.0.0:18082
- --advertise-pandaproxy-addr internal://redpanda:8082,external://localhost:18082
ports:
- "19092:19092"
- "18082:18082"
healthcheck:
test: ["CMD-SHELL", "rpk cluster health | grep -q 'Healthy'"]
interval: 10s
timeout: 5s
retries: 5
networks:
- flash-sale-network
gateway:
build: .
image: flash-engine:latest
command: ["./gateway-bin"]
ports:
- "8080:8080"
depends_on:
redis:
condition: service_healthy
redpanda:
condition: service_healthy
environment:
- REDIS_ADDR=redis:6379
- KAFKA_ADDR=redpanda:9092
networks:
- flash-sale-network
processor:
build: .
image: flash-engine:latest
command: ["./processor-bin"]
ports:
- "9090:9090" # Prometheus metrics endpoint
depends_on:
redis:
condition: service_healthy
redpanda:
condition: service_healthy
environment:
- REDIS_ADDR=redis:6379
- KAFKA_ADDR=redpanda:9092
networks:
- flash-sale-network
networks:
flash-sale-network:
driver: bridge