-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
89 lines (82 loc) · 3.03 KB
/
docker-compose.yaml
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
version: '3.8'
services:
telegram-bot-service:
build: ./telegram-bot-service
ports:
- ${SPRING_LOCAL_PORT}:${SPRING_DOCKER_PORT}
- ${DEBUG_PORT}:${DEBUG_PORT}
env_file: ./.env
environment:
SPRING_APPLICATION_JSON: '{
"spring.application.name": "telegram-bot-service",
"spring.kafka.bootstrap-servers": "kafka:9092",
"spring.kafka.producer.key-serializer": "org.apache.kafka.common.serialization.StringSerializer",
"spring.kafka.producer.value-serializer": "org.apache.kafka.common.serialization.StringSerializer",
"spring.kafka.consumer.key-deserializer": "org.apache.kafka.common.serialization.StringDeserializer",
"spring.kafka.consumer.value-deserializer": "org.apache.kafka.common.serialization.StringDeserializer",
"spring.kafka.consumer.group-id": "fintracker",
"spring.kafka.consumer.auto-offset-reset": "earliest",
"spring.cloud.config.uri": "http://config-server:8888",
"spring.cloud.eureka.client.serviceUrl.defaultZone": "http://eureka-server:8761/eureka/",
"telegram.bot.username": "${TELEGRAM_BOT_USERNAME}",
"telegram.bot.token": "${TELEGRAM_BOT_TOKEN}"
}'
depends_on:
- eureka-server
- config-server
- kafka
ocr-service:
build: ./ocr-service
ports:
- "8082:8080"
environment:
SPRING_APPLICATION_JSON: '{
"spring.application.name": "ocr-service",
"spring.kafka.bootstrap-servers": "kafka:9092",
"spring.kafka.consumer.group-id": "ocr-service-group",
"spring.kafka.consumer.auto-offset-reset": "earliest",
"spring.kafka.consumer.key-deserializer": "org.apache.kafka.common.serialization.StringDeserializer",
"spring.kafka.consumer.value-deserializer": "org.apache.kafka.common.serialization.StringDeserializer"
}'
depends_on:
- kafka
config-server:
build: ./config-server
ports:
- "8888:8888"
environment:
SPRING_APPLICATION_JSON: '{
"server.port": 8888,
"spring.cloud.config.server.git.uri": "https://github.com/your-config-repo",
"spring.cloud.config.server.git.clone-on-start": true,
"eureka.client.serviceUrl.defaultZone": "http://eureka-server:8761/eureka/"
}'
eureka-server:
build: ./eureka-server
ports:
- "8761:8761"
environment:
SPRING_APPLICATION_JSON: '{
"server.port": 8761,
"eureka.client.register-with-eureka": false,
"eureka.client.fetch-registry": false,
"eureka.server.enable-self-preservation": false
}'
kafka:
image: confluentinc/cp-kafka:latest
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
depends_on:
- zookeeper
zookeeper:
image: confluentinc/cp-zookeeper:latest
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000