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:latest"
7     ports:
8       - 2181:2181
9     environment:
10       ZOOKEEPER_CLIENT_PORT: 2181
11
12   kafka:
13     image: confluentinc/cp-kafka:latest
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   jdbc:
26     image: juplo/jdbc:outbox
27     ports:
28       - 8080:8080
29     environment:
30       spring.profiles.active: prod
31     depends_on:
32       - postgres
33
34   outbox:
35     image: juplo/outbox:polling
36     environment:
37       spring.profiles.active: prod
38     depends_on:
39       - postgres
40       - kafka
41
42
43   postgres:
44     image: postgres:13
45     ports:
46       - 5432:5432
47     environment:
48       POSTGRES_USER: outbox
49       POSTGRES_PASSWORD: outbox
50       POSTGRES_DB: outbox
51     volumes:
52       - pgdata:/var/lib/postgresql/data/
53
54 volumes:
55   pgdata: