forked from wlatanowicz/wait-for-dep
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
97 lines (87 loc) · 2.67 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
version: "3.0"
services:
wait-for-dep:
build:
context: .
environment:
PYTHONUNBUFFERED: 1
volumes:
# attach docker socket to test unix sockets
- /var/run/docker.sock:/var/run/docker.sock
command:
- https://www.google.com
- http://nginx
- tcp://nginx:80
- unix:///var/run/docker.sock
- psql://admin:example@postgres/db
- mysql://admin:example@mysql/db
- memcached://memcached/
- amqp://admin:example@rabbitmq/vhost
- kafka://kafka1:19092/,kafka://kafka2:19092/
- redis://redis/5
- mongodb://root:password@mongo/db
nginx:
image: nginx:1.19
postgres:
image: postgres:13.2
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: example
POSTGRES_DB: db
mysql:
image: mysql:8.0
environment:
MYSQL_USER: admin
MYSQL_PASSWORD: example
MYSQL_DATABASE: db
MYSQL_RANDOM_ROOT_PASSWORD: "true"
memcached:
image: memcached:1.6
rabbitmq:
image: rabbitmq:3.8
environment:
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: example
RABBITMQ_DEFAULT_VHOST: vhost
redis:
image: redis:3.0
mongo:
image: mongo:3.6.21
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=password
zookeeper: # for kafka
image: zookeeper:3.4.9
hostname: zookeeper
environment:
ZOO_MY_ID: 1
ZOO_PORT: 2181
ZOO_SERVERS: server.1=zookeeper:2888:3888
kafka1:
image: confluentinc/cp-kafka:5.3.0
hostname: kafka1
environment:
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka1:19092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER_INTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_BROKER_ID: 1
KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_NUM_PARTITIONS: 8
depends_on:
- zookeeper
kafka2:
image: confluentinc/cp-kafka:5.3.0
hostname: kafka2
environment:
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka2:19092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER_INTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_BROKER_ID: 2
KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_NUM_PARTITIONS: 8
depends_on:
- zookeeper