Moved postage of messages into a reusable standalone implementation
[demos/kafka/outbox] / docker-compose.yml
1 version: "3"
2
3 services:
4
5   zookeeper:
6     image: confluentinc/cp-zookeeper:6.0.1
7     ports:
8       - 2181:2181
9     environment:
10       ZOOKEEPER_CLIENT_PORT: 2181
11
12   kafka:
13     image: confluentinc/cp-kafka:6.0.1
14     ports:
15       - 9092:9092
16     environment:
17       KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
18       KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
19       KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://localhost:9092
20       KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
21       KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
22     depends_on:
23       - zookeeper
24
25   kafkacat:
26     image: confluentinc/cp-kafkacat:6.0.1
27     command: "kafkacat -C -b kafka:9093 -q -t outbox -K:"
28     tty: true
29     depends_on:
30       - kafka
31
32   jdbc:
33     image: juplo/data-jdbc:polling-outbox-2-SNAPSHOT
34     ports:
35       - 8080:8080
36     environment:
37       spring.profiles.active: prod
38     depends_on:
39       - postgres
40
41   outbox:
42     image: juplo/outbox-delivery:polling-outbox-2-SNAPSHOT
43     environment:
44       spring.profiles.active: prod
45     depends_on:
46       - postgres
47       - kafka
48
49
50   postgres:
51     image: postgres:13
52     ports:
53       - 5432:5432
54     environment:
55       POSTGRES_USER: outbox
56       POSTGRES_PASSWORD: outbox
57       POSTGRES_DB: outbox
58     volumes:
59       - pgdata:/var/lib/postgresql/data/
60
61 volumes:
62   pgdata: