-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
71 lines (65 loc) · 1.43 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
71
version: '3.8'
services:
zookeeper:
container_name: zookeeper
image: wurstmeister/zookeeper
ports:
- 2181:2181
kafka:
container_name: kafka
image: wurstmeister/kafka
ports:
- 9092:9092
volumes:
- ./data/kafka:/var/run/docker.sock
environment:
- KAFKA_ADVERTISED_HOST_NAME=kafka
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
mongo:
container_name: mongo
image: mongo
ports:
- 27017:27017
volumes:
- ./data/mongo:/data/db
postgres:
container_name: postgres
image: postgres
ports:
- 5433:5432
volumes:
- ./data/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=service1
service1:
container_name: service1
ports:
- 4000:4000
build: ./service1
volumes:
- ./service1:/app
environment:
- PORT=4000
- POSTGRES_URL:postgres://postgres:postgres@postgres:5432/postgres
- KAFKA_BOOTSTRAP_SERVER=kafka:9092
- KAFKA_TOPIC=topic1
depends_on:
- postgres
- kafka
service2:
container_name: service2
ports:
- 5000:4000
build: ./service2
volumes:
- ./service2:/app
environment:
- PORT=4000
- MONGO_URL=mongodb://mongo:27017/service2
- KAFKA_BOOTSTRAP_SERVER=kafka:9092
- KAFKA_TOPIC=topic1
depends_on:
- mongo
- kafka