-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (63 loc) · 1.59 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
version: "3.6"
services:
# SSE Tweets Stream
sse_api:
image: alexburlacu/rtp-server:faf18x
container_name: sse_api
ports:
- 4000:4000
# MongoDB (a replication set node instance)
mongodb_service:
image: mongo
container_name: mongodb_service
hostname: mongodb_service
ports:
- 27017:27017
restart: always
# for initiating replication set (named rs0)
healthcheck:
test: test $$(echo "rs.initiate({_id:'rs0',members:[{_id:0,host:\"mongodb_service:27017\"}]}).ok || rs.status().ok" | mongo --port 27017 --quiet) -eq 1
interval: 10s
start_period: 30s
command: [ "--replSet", "rs0", "--bind_ip_all", "--port", "27017" ]
# Message Broker
message_broker:
container_name: message_broker
build:
context: ./message_broker
dockerfile: Dockerfile
ports:
- 8000:8000
# Producer (working with sse_api)
rtp_sse:
container_name: rtp_sse
build:
context: ./rtp_sse
dockerfile: Dockerfile
ports:
- 8080:8080
depends_on:
- mongodb_service
# ChangeStream (change data capture service)
change_stream:
container_name: change_stream
build:
context: ./change_stream
dockerfile: Dockerfile
ports:
- 8001:8001
depends_on:
- message_broker
- mongodb_service
# Subscriber (Test subscribers for an MB stress test)
subscriber:
container_name: subscriber
build:
context: ./subscriber
dockerfile: Dockerfile
ports:
- 9000:9000
depends_on:
- message_broker
- mongodb_service
- change_stream