initial commit
This commit is contained in:
+88
@@ -0,0 +1,88 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:18-alpine
|
||||
container_name: cdc_postgres
|
||||
command:
|
||||
- postgres
|
||||
- -c
|
||||
- wal_level=logical
|
||||
- -c
|
||||
- max_wal_senders=10
|
||||
- -c
|
||||
- max_replication_slots=10
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: postgres
|
||||
ports:
|
||||
- "5453:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql
|
||||
- ./postgres/init:/docker-entrypoint-initdb.d:ro,Z
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
|
||||
nats:
|
||||
image: nats:2
|
||||
container_name: cdc_nats
|
||||
command:
|
||||
- "--debug"
|
||||
- "--http_port=8222"
|
||||
- "--js"
|
||||
- "--store_dir=/data"
|
||||
ports:
|
||||
- "4222:4222"
|
||||
- "8222:8222"
|
||||
volumes:
|
||||
- nats_data:/data
|
||||
|
||||
debezium:
|
||||
image: quay.io/debezium/server:3.5.2.Final
|
||||
container_name: cdc_debezium
|
||||
volumes:
|
||||
- ./application.properties:/debezium/config/application.properties:ro,Z
|
||||
- debezium_data:/debezium/data
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
nats:
|
||||
condition: service_started
|
||||
|
||||
seed:
|
||||
image: postgres:18-alpine
|
||||
container_name: cdc_postgres_seed
|
||||
profiles: ["tools"]
|
||||
environment:
|
||||
PGHOST: postgres
|
||||
PGUSER: postgres
|
||||
PGPASSWORD: postgres
|
||||
PGDATABASE: postgres
|
||||
volumes:
|
||||
- ./scripts:/scripts:ro,Z
|
||||
entrypoint: ["sh", "/scripts/seed.sh"]
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
debezium:
|
||||
condition: service_started
|
||||
|
||||
nats-cli:
|
||||
image: natsio/nats-box:latest
|
||||
container_name: cdc_nats_cli
|
||||
profiles: ["tools"]
|
||||
environment:
|
||||
NATS_URL: nats://nats:4222
|
||||
volumes:
|
||||
- ./scripts:/scripts:ro,Z
|
||||
entrypoint: ["sh"]
|
||||
depends_on:
|
||||
nats:
|
||||
condition: service_started
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
nats_data:
|
||||
debezium_data:
|
||||
Reference in New Issue
Block a user