-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
71 lines (65 loc) · 1.49 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
services:
redis:
image: redis:latest
ports:
- "6379:6379"
zookeeper:
image: confluentinc/cp-zookeeper:latest
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-kafka:latest
ports:
- "9092:9092"
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
healthcheck:
test: ["CMD", "kafka-topics", "--bootstrap-server", "kafka:9092", "--list"]
interval: 30s
timeout: 10s
retries: 50
gateway:
build:
context: ./api-gateway-code-detective
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
- code-detective
- code-detective-model
- redis
- kafka
environment:
SPRING_REDIS_HOST: redis
SPRING_REDIS_PORT: 6379
SPRING_PROFILES_ACTIVE: staging
code-detective:
build:
context: ./code-detective
dockerfile: Dockerfile
ports:
- "8081:8081"
environment:
KAFKA_ADDR: kafka:9092
depends_on:
- code-detective-model
- kafka
code-detective-model:
build:
context: ./code-detective-model
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
OPENAI_API_KEY: ${OPENAI_API_KEY}
KAFKA_ADDR: kafka:9092
depends_on:
- kafka