-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (65 loc) · 2.28 KB
/
Copy pathdocker-compose.yml
File metadata and controls
71 lines (65 loc) · 2.28 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
services:
stats-db:
image: postgres:16.1
container_name: ewm-stats-db-compose
ports:
- "6542:5432"
environment:
POSTGRES_USER: stat_user
POSTGRES_PASSWORD: stat_password
POSTGRES_DB: ewm_stats_db
volumes:
- ./stats/analyzer/src/main/resources/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB} -p 5432" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
ewm-db:
image: postgres:16.1
container_name: ewm-main-db-compose
ports:
- "5432:5432"
environment:
POSTGRES_USER: ewm_user
POSTGRES_PASSWORD: ewm_password
POSTGRES_DB: ewm_main_db
volumes:
- ./core/event-service/src/main/resources/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB} -p 5432" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
kafka:
image: confluentinc/confluent-local:7.4.3
hostname: kafka
container_name: kafka
ports:
- "9092:9092" # for client connections
- "9101:9101" # JMX
restart: unless-stopped
environment:
KAFKA_NODE_ID: 1
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092'
KAFKA_JMX_PORT: 9101
KAFKA_JMX_HOSTNAME: localhost
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@kafka:29093'
KAFKA_LISTENERS: 'PLAINTEXT://kafka:29092,CONTROLLER://kafka:29093,PLAINTEXT_HOST://0.0.0.0:9092'
CLUSTER_ID: 'K0EA9p0yEe6MkAAAAkKsEg'
kafka-init-topics:
image: confluentinc/confluent-local:7.4.3
container_name: kafka-init-topics
depends_on:
- kafka
command: "bash -c \
'kafka-topics --create --topic stats.user-actions.v1 \
--partitions 1 --replication-factor 1 --if-not-exists \
--bootstrap-server kafka:29092 && \
kafka-topics --create --topic stats.events-similarity.v1 \
--partitions 1 --replication-factor 1 --if-not-exists \
--bootstrap-server kafka:29092'"
init: true