-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (89 loc) · 2.38 KB
/
docker-compose.yml
File metadata and controls
97 lines (89 loc) · 2.38 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
services:
main_service_db:
build: ./main_service_db/
restart: always
container_name: main_service_db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: my_password
POSTGRES_DB: main_service_soa
ports:
- "2345:5432"
main_service:
build: ./main_service
environment:
DATABASE_URL: postgres://postgres:my_password@main_service_db:5432/main_service_soa
command: sh -c "sleep 10s; cargo run -- 4000"
ports:
- "4000:4000"
depends_on:
- main_service_db
- tasks_service
tasks_service_db:
build: ./tasks_service_db/
restart: always
container_name: tasks_service_db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: my_password
POSTGRES_DB: tasks_service_soa
# ports:
# - "2346:5432"
tasks_service:
build: ./tasks_service
environment:
DATABASE_HOST: tasks_service_db
DATABASE_PORT: 5432
DATABASE_NAME: tasks_service_soa
DATABASE_USER: postgres
DATABASE_PASSWORD: my_password
command: sh -c "ls ; sleep 10s ; python3 server.py"
ports:
- "50051:50051"
depends_on:
- tasks_service_db
- kafka
zookeeper:
image: confluentinc/cp-zookeeper:latest
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
kafka:
image: confluentinc/cp-kafka:latest
depends_on:
- zookeeper
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
volumes:
- kafka_data:/var/lib/kafka
clickhouse:
image: clickhouse/clickhouse-server
ports:
- "8123:8123"
volumes:
- clickhouse_data:/var/lib/clickhouse
stat_service:
build: ./stat_service
# environment:
# DATABASE_HOST: tasks_service_db
# DATABASE_PORT: 5432
# DATABASE_NAME: tasks_service_soa
# DATABASE_USER: postgres
# DATABASE_PASSWORD: my_password
command: sh -c "ls ; sleep 10s ; python3 server.py"
ports:
- "50052:50052"
depends_on:
- clickhouse
- kafka
volumes:
kafka_data:
clickhouse_data: