File tree Expand file tree Collapse file tree 3 files changed +24
-8
lines changed Expand file tree Collapse file tree 3 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 1- version : ' 3.8'
21services :
32 # https://hub.docker.com/_/postgres
3+ # https://codepruner.com/how-to-run-postgresql-and-adminer-or-pgadmin-with-docker-compose/
44 db :
55 container_name : db
6- image : postgres
6+ image : postgres:latest
77 restart : always
8+ # network_mode: host
89 environment :
910 - POSTGRES_USER=postgres
1011 - POSTGRES_PASSWORD=postgres
1112 ports :
12- - ' 5432:5432'
13+ - 5432:5432
1314 volumes :
1415 - ./postgres_data:/var/lib/postgresql/data
15- - ./src/main/resources/dml/schema.sql:/docker-entrypoint-initdb.d/schema.sql
16+ # https://stackoverflow.com/questions/26598738/how-to-create-user-database-in-script-for-docker-postgres
17+ - ./src/main/resources/dml/schema.sql:/docker-entrypoint-initdb.d/1-schema.sql
1618 command : [ "postgres", "-c", "wal_level=logical" ]
1719 adminer :
18- image : adminer
20+ container_name : adminer
21+ image : adminer:latest
1922 restart : always
23+ # network_mode: host
24+ depends_on :
25+ - db
2026 ports :
21- - 8081:8081
27+ - 80:8080
28+
29+ # docker networking!
30+ # https://stackoverflow.com/questions/56582446/how-to-use-host-network-for-docker-compose
31+ # https://stackoverflow.com/questions/70725881/what-is-the-equivalent-of-add-host-host-docker-internalhost-gateway-in-a-comp
32+ # networks:
33+ # mynetwork:
34+ # external: true
35+ # name: host
Original file line number Diff line number Diff line change @@ -24,4 +24,6 @@ https://github.com/rayanegouda/medium/tree/main/step1
2424
2525## postgres
2626
27- https://debezium.io/documentation/reference/stable/connectors/postgresql.html
27+ https://debezium.io/documentation/reference/stable/connectors/postgresql.html
28+
29+ ![ img.png] ( img.png )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS the_simpsons.character (
99 update_ts TIMESTAMP DEFAULT current_timestamp NOT NULL
1010);
1111-- ----/*Insertion des données dans la table character.*/
12- INSERT INTO the_simpsons .character (nom, pays ) VALUES
12+ INSERT INTO the_simpsons .character (name, surname ) VALUES
1313 (' Homer' ,' Simpson' ),
1414 (' Bart' ,' Simpson' ),
1515 (' Lisa' ,' Simpson' );
You can’t perform that action at this time.
0 commit comments