-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
68 lines (64 loc) · 1.72 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
services:
ruby:
image: ruby:${RUBY_VERSION:-3.2}
environment:
HISTFILE: /app/tmp/.bash_history
BUNDLE_PATH: /usr/local/bundle
BUNDLE_CONFIG: /app/.bundle/config
DATABASE_URL: postgres://postgres:@postgres:5432
KAFKAFILE: spec/internal/Kafkafile
depends_on:
kafka:
condition: service_started
postgres:
condition: service_started
command: bash
working_dir: /app
volumes:
- .:/app:cached
- bundler_data:/usr/local/bundle
postgres:
image: postgres:13
environment:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432
healthcheck:
test: pg_isready -U postgres -h 127.0.0.1
interval: 10s
kafka:
image: bitnami/kafka:2.7.0
ports:
- '9092:9092'
environment:
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,INTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,INTERNAL://:9091
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9092,INTERNAL://kafka:9091
- KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL
depends_on:
- zookeeper
healthcheck:
# we don't have `nc` installed in kafka image :(
test:
- CMD-SHELL
- echo 'exit' | curl --silent -f telnet://0.0.0.0:9092
interval: 15s
timeout: 5s
retries: 15
zookeeper:
image: bitnami/zookeeper:3.5
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
healthcheck:
test: ["CMD-SHELL", "echo ruok | nc localhost 2181"]
interval: 2s
timeout: 2s
retries: 15
volumes:
bundler_data:
kafka: