forked from looplab/eventhorizon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
102 lines (93 loc) · 2.23 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
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
98
99
100
101
102
version: "3.4"
volumes:
mongodb:
services:
eventhorizon-test:
build:
context: .
dockerfile: Dockerfile.test
depends_on:
- mongodb
- gpubsub
- kafka
- redis
- jetstream
environment:
MONGODB_ADDR: "mongodb:27017"
PUBSUB_EMULATOR_HOST: "gpubsub:8793"
KAFKA_ADDR: "kafka:9092"
REDIS_ADDR: "redis:6379"
NATS_ADDR: "jetstream:4222"
command:
- -c
- make test test_integration
# MongoDB replica set setup.
mongodb:
image: mongo:4.4
restart: on-failure
depends_on:
- mongodb-rs
networks:
default:
entrypoint: ["bash", "/scripts/mongodb-rs-setup.sh"]
volumes:
- ./scripts/mongodb-rs-setup.sh:/scripts/mongodb-rs-setup.sh
mongodb-rs:
image: mongo:4.4
restart: always
ports:
- "27017:27017"
command: ["--replSet", "rs0", "--bind_ip_all"]
healthcheck:
test: test $$(echo "rs.status().ok" | mongo --quiet) -eq 1
interval: 10s
start_period: 30s
volumes:
- mongodb:/data/db
gpubsub:
image: gcr.io/google.com/cloudsdktool/cloud-sdk:326.0.0-emulators
ports:
- "8793:8793"
entrypoint:
- gcloud
- beta
- emulators
- pubsub
- start
- "--host-port=0.0.0.0:8793"
zookeeper:
image: bitnami/zookeeper:3.6.2
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: bitnami/kafka:2.7.0
depends_on:
- zookeeper
ports:
- "9092:9092"
- "9093:9093"
environment:
- KAFKA_BROKER_ID=1
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9093
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9092,EXTERNAL://localhost:9093
- KAFKA_INTER_BROKER_LISTENER_NAME=CLIENT
- KAFKA_CFG_OFFSETS_TOPIC_NUM_PARTITIONS=5
redis:
image: redis:6.2-alpine3.13
ports:
- "6379:6379"
entrypoint:
- redis-server
- "--appendonly yes"
jetstream:
image: synadia/jsm:nightly
ports:
- "4222:4222"
- "8222:8222"
command:
- server