2024-10-28 00:25:51 +04:00
|
|
|
services:
|
2024-11-12 19:57:44 +04:00
|
|
|
cloud:
|
|
|
|
build: ./Cloud/
|
2024-11-13 01:49:13 +04:00
|
|
|
ports:
|
2024-11-12 19:57:44 +04:00
|
|
|
- "5124:5124"
|
|
|
|
depends_on:
|
|
|
|
- postgres
|
2024-11-13 02:08:51 +04:00
|
|
|
- redis
|
2024-10-28 00:25:51 +04:00
|
|
|
postgres:
|
2024-11-13 01:49:13 +04:00
|
|
|
image: postgres:14
|
2024-10-28 00:25:51 +04:00
|
|
|
container_name: cucumber_database
|
|
|
|
environment:
|
2024-11-13 01:49:13 +04:00
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_PASSWORD: 12345
|
|
|
|
POSTGRES_DB: main_database
|
2024-10-28 00:25:51 +04:00
|
|
|
ports:
|
2024-11-13 01:49:13 +04:00
|
|
|
- "5438:5432"
|
2024-10-28 00:25:51 +04:00
|
|
|
volumes:
|
|
|
|
- postgres_data:/var/lib/postgresql/data
|
2024-11-10 13:35:23 +04:00
|
|
|
redis:
|
|
|
|
image: 'redis:latest'
|
|
|
|
ports:
|
|
|
|
- '6379:6379'
|
|
|
|
volumes:
|
|
|
|
- 'cloud-redis:/data'
|
|
|
|
healthcheck:
|
|
|
|
test:
|
|
|
|
- CMD
|
|
|
|
- redis-cli
|
|
|
|
- ping
|
|
|
|
retries: 3
|
|
|
|
timeout: 5s
|
2024-10-28 14:47:20 +04:00
|
|
|
kafka:
|
|
|
|
image: confluentinc/cp-kafka:7.4.0
|
|
|
|
ports:
|
|
|
|
- 9092:9092
|
|
|
|
- 9997:9997
|
|
|
|
expose:
|
|
|
|
- 29092:29092
|
|
|
|
environment:
|
|
|
|
KAFKA_BROKER_ID: 1
|
|
|
|
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
|
|
|
|
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
|
|
|
|
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
|
|
|
|
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
|
|
|
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
|
|
|
|
KAFKA_LOG_FLUSH_INTERVAL_MESSAGES: 10000
|
|
|
|
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
|
|
|
|
depends_on:
|
|
|
|
- zookeeper
|
|
|
|
init-kafka:
|
|
|
|
image: confluentinc/cp-kafka:7.4.0
|
|
|
|
depends_on:
|
|
|
|
- kafka
|
|
|
|
entrypoint: [ '/bin/sh', '-c' ]
|
|
|
|
command: |
|
|
|
|
"
|
|
|
|
# blocks until kafka is reachable
|
|
|
|
kafka-topics --bootstrap-server kafka:29092 --list
|
|
|
|
|
|
|
|
echo -e 'Creating kafka topics'
|
|
|
|
kafka-topics --bootstrap-server kafka:29092 --create --if-not-exists --topic commands --replication-factor 1 --partitions 1
|
|
|
|
kafka-topics --bootstrap-server kafka:29092 --create --if-not-exists --topic data --replication-factor 1 --partitions 1
|
2024-10-29 17:31:47 +04:00
|
|
|
kafka-topics --bootstrap-server kafka:29092 --create --if-not-exists --topic dataDetectors --replication-factor 1 --partitions 1
|
2024-10-28 14:47:20 +04:00
|
|
|
kafka-topics --bootstrap-server kafka:29092 --create --if-not-exists --topic response --replication-factor 1 --partitions 1
|
|
|
|
|
|
|
|
echo -e 'Successfully created the following topics:'
|
|
|
|
kafka-topics --bootstrap-server kafka:29092 --list
|
|
|
|
"
|
|
|
|
kafka-ui:
|
|
|
|
container_name: kafka-ui
|
|
|
|
image: provectuslabs/kafka-ui:latest
|
|
|
|
ports:
|
|
|
|
- 8080:8080
|
|
|
|
depends_on:
|
|
|
|
- kafka
|
|
|
|
environment:
|
|
|
|
KAFKA_CLUSTERS_0_NAME: local
|
|
|
|
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092
|
2024-11-19 16:43:03 +04:00
|
|
|
KAFKA_CLUSTERS_0_METRICS_PORT: 9997
|
2024-10-28 00:25:51 +04:00
|
|
|
volumes:
|
|
|
|
postgres_data:
|
2024-11-10 13:35:23 +04:00
|
|
|
driver: local
|
|
|
|
cloud-redis:
|
2024-11-13 02:08:51 +04:00
|
|
|
driver: local
|
2024-11-19 16:43:03 +04:00
|
|
|
zookeeper:
|
|
|
|
image: confluentinc/cp-zookeeper:7.4.0
|
|
|
|
environment:
|
|
|
|
ZOOKEEPER_CLIENT_PORT: 2181
|
|
|
|
ZOOKEEPER_TICK_TIME: 2000
|
|
|
|
ports:
|
|
|
|
- 2181:2181
|