Skip to content

Commit

Permalink
apply formatting rules
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Vergnaud <[email protected]>
  • Loading branch information
ericvergnaud committed Jan 12, 2024
1 parent 17ecee5 commit 0a969e0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
25 changes: 13 additions & 12 deletions samples/postgres-cdc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ It relies on wal2json for change notifications, see https://github.com/eulerto/w
It uses redis-cli to publish the notifications.

Demo usage:
- the CDC'ed database must pre-exist, it should first be created as follows
- run `cd cdc`
- run `docker run -p 5432:5432 -v ./postgres-data:/var/lib/postgresql/data -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres postgres:12.16`
- using a postgresql client, create the 'test_db' database and a table
- Ctrl-C the docker container started above
- now run `docker compose up -d`
- checking configuration:

- from docker desktop, open a terminal to redis container
- from that terminal, run `redis-cli SUBSCRIBE test_db_changes`
- using a postgresql client, perform some inserts, updates or deletes in the 'test_db' database
- the CDC'ed database must pre-exist, it should first be created as follows
- run `cd cdc`
- run `docker run -p 5432:5432 -v ./postgres-data:/var/lib/postgresql/data -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres postgres:12.16`
- using a postgresql client, create the 'test_db' database and a table
- Ctrl-C the docker container started above
- now run `docker compose up -d`
- checking configuration:

- from docker desktop, open a terminal to redis container
- from that terminal, run `redis-cli SUBSCRIBE test_db_changes`
- using a postgresql client, perform some inserts, updates or deletes in the 'test_db' database

Real usage:
- you need to configure the env variables of the postgres service in the docker-compose.yml file
- the database name should be set to the messages repository name configured for the mediator

- you need to configure the env variables of the postgres service in the docker-compose.yml file
- the database name should be set to the messages repository name configured for the mediator
2 changes: 0 additions & 2 deletions samples/postgres-cdc/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@ services:
platform: linux/amd64
ports:
- 6379:6379


0 comments on commit 0a969e0

Please sign in to comment.