Created
August 19, 2021 09:18
-
-
Save ereshzealous/190f19d7ad5c8e3ece5496ba4efc7d7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.5" | |
services: | |
# Install postgres and setup the user service database | |
postgres: | |
build: users-service/postgres | |
restart: always | |
ports: | |
- '5432:5432' | |
environment: | |
- POSTGRES_DB=user_DB | |
- POSTGRES_USER=postgres | |
- POSTGRES_PASSWORD=postgres | |
# Install zookeeper. | |
zookeeper: | |
container_name: zookeeper | |
image: zookeeper | |
ports: | |
- '2181:2181' | |
# Install kafka and create needed topics. | |
kafka: | |
container_name: kafka | |
image: confluentinc/cp-kafka | |
hostname: kafka | |
ports: | |
- '9092:9092' | |
- '29092:29092' | |
environment: | |
KAFKA_BROKER_ID: 1 | |
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 | |
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT | |
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_HOST://kafka:29092 | |
LISTENERS: PLAINTEXT://0.0.0.0:9092 | |
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | |
depends_on: | |
- zookeeper | |
# Install debezium-connect and add outbox-transformer here. | |
debezium-connect: | |
container_name: custom-debezium-connect | |
image: outbox-transformer | |
hostname: debezium-connect | |
ports: | |
- '8083:8083' | |
environment: | |
GROUP_ID: 1 | |
CONFIG_STORAGE_TOPIC: debezium_connect_config | |
OFFSET_STORAGE_TOPIC: debezium_connect_offsets | |
STATUS_STORAGE_TOPIC: debezium_connect_status | |
BOOTSTRAP_SERVERS: kafka:29092 | |
depends_on: | |
- kafka | |
- postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment