forked from juliuskrah/keycloak-kafka-event-listener
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
64 lines (62 loc) · 1.93 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
version: '3.8'
services:
postgres:
container_name: kpostgres
build:
context: ./postgres
dockerfile: Dockerfile
environment:
- POSTGRES_USER=${POSTGRES_USER:-keycloak_user}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-1CC0FE5D72748A6AC5FF778ACB4C7201A14B6F6AC17E338CCF373082905C92AE}
- POSTGRES_DB=${POSTGRES_DB:-keycloak}
- POSTGRES_MULTIPLE_DATABASES=identity
volumes:
- keycloakdb:/var/lib/postgresql/data
zookeeper:
image: confluentinc/cp-zookeeper:5.2.1
container_name: kzookeeper
environment:
- ZOOKEEPER_CLIENT_PORT=2181
- ZOOKEEPER_TICK_TIME=2000
- ZOOKEEPER_SYNC_LIMIT=2
ports:
- '2181:2181'
kafka:
image: confluentinc/cp-kafka:5.2.1
container_name: kkafka
environment:
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
- KAFKA_BROKER_ID=1
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
ports:
- '9092:9092'
depends_on:
- zookeeper
keycloak:
container_name: kkeycloak
build:
context: .
dockerfile: ./keycloak/Dockerfile
environment:
- KAFKA_BOOTSTRAP_SERVERS=kafka:29092
- KAFKA_KEY_SERIALIZER_CLASS=org.apache.kafka.common.serialization.StringSerializer
- KAFKA_VALUE_SERIALIZER_CLASS=com.juliuskrah.keycloak.provider.JsonSerializer
- KAFKA_ACKS=all
- KAFKA_DELIVERY_TIMEOUT_MS=3000
- KAFKA_REQUEST_TIMEOUT_MS=2000
- KAFKA_LINGER_MS=1
- KAFKA_BATCH_SIZE=16384
- KAFKA_BUFFER_MEMORY=33554432
- KEYCLOAK_PROVIDER_LOGLEVEL=DEBUG
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=admin
- DB_DATABASE=identity
- DB_SCHEMA=identity
- DB_USER=identity
- DB_PASSWORD=identity
ports:
- '8080:8080'
volumes:
keycloakdb: