Commit 33e44376f70235b1e6a5ea3c2850e6af9710742a
1 parent
06f5adee
Exists in
master
Start Postgres with WAL logical
Showing
3 changed files
with
19 additions
and
25 deletions
Show diff stats
debezium/postgres/docker-compose.yml
@@ -29,27 +29,6 @@ services: | @@ -29,27 +29,6 @@ services: | ||
29 | KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0 | 29 | KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0 |
30 | KAFKA_JMX_PORT: 9101 | 30 | KAFKA_JMX_PORT: 9101 |
31 | KAFKA_JMX_HOSTNAME: localhost | 31 | KAFKA_JMX_HOSTNAME: localhost |
32 | - | ||
33 | - postgres: | ||
34 | - image: postgres:latest | ||
35 | - restart: always | ||
36 | - container_name: postgres | ||
37 | - hostname: postgres | ||
38 | - ports: | ||
39 | - - "5432:5432" | ||
40 | - environment: | ||
41 | - POSTGRES_USER: postgres | ||
42 | - POSTGRES_PASSWORD: postgres | ||
43 | - POSTGRES_DB: movies_db | ||
44 | - healthcheck: | ||
45 | - test: ["CMD", "psql", "-U", "postgres", "-c", "SELECT 1"] | ||
46 | - interval: 10s | ||
47 | - timeout: 5s | ||
48 | - retries: 5 | ||
49 | - volumes: | ||
50 | - - ./scripts:/docker-entrypoint-initdb.d | ||
51 | - - ./pg.conf:/etc/postgresql/postgresql.conf | ||
52 | - | ||
53 | debezium: | 32 | debezium: |
54 | image: debezium/connect:latest | 33 | image: debezium/connect:latest |
55 | restart: always | 34 | restart: always |
@@ -99,3 +78,22 @@ services: | @@ -99,3 +78,22 @@ services: | ||
99 | KAFKA_REST_BOOTSTRAP_SERVERS: 'broker:29092' | 78 | KAFKA_REST_BOOTSTRAP_SERVERS: 'broker:29092' |
100 | KAFKA_REST_LISTENERS: "http://0.0.0.0:8082" | 79 | KAFKA_REST_LISTENERS: "http://0.0.0.0:8082" |
101 | 80 | ||
81 | + postgres: | ||
82 | + image: postgres:latest | ||
83 | + restart: always | ||
84 | + container_name: postgres | ||
85 | + hostname: postgres | ||
86 | + ports: | ||
87 | + - "5432:5432" | ||
88 | + environment: | ||
89 | + POSTGRES_USER: postgres | ||
90 | + POSTGRES_PASSWORD: postgres | ||
91 | + POSTGRES_DB: movies_db | ||
92 | + command: ["postgres", "-c", "wal_level=logical"] | ||
93 | + healthcheck: | ||
94 | + test: ["CMD", "psql", "-U", "postgres", "-c", "SELECT 1"] | ||
95 | + interval: 10s | ||
96 | + timeout: 5s | ||
97 | + retries: 5 | ||
98 | + volumes: | ||
99 | + - ./scripts:/docker-entrypoint-initdb.d |
debezium/postgres/pg.conf
@@ -1 +0,0 @@ | @@ -1 +0,0 @@ | ||
1 | -wal_level = logical |
debezium/postgres/scripts/data.sql