File tree 3 files changed +24
-8
lines changed
3 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 1
- version : ' 3.8'
2
1
services :
3
2
# https://hub.docker.com/_/postgres
3
+ # https://codepruner.com/how-to-run-postgresql-and-adminer-or-pgadmin-with-docker-compose/
4
4
db :
5
5
container_name : db
6
- image : postgres
6
+ image : postgres:latest
7
7
restart : always
8
+ # network_mode: host
8
9
environment :
9
10
- POSTGRES_USER=postgres
10
11
- POSTGRES_PASSWORD=postgres
11
12
ports :
12
- - ' 5432:5432'
13
+ - 5432:5432
13
14
volumes :
14
15
- ./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
16
18
command : [ "postgres", "-c", "wal_level=logical" ]
17
19
adminer :
18
- image : adminer
20
+ container_name : adminer
21
+ image : adminer:latest
19
22
restart : always
23
+ # network_mode: host
24
+ depends_on :
25
+ - db
20
26
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
24
24
25
25
## postgres
26
26
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 (
9
9
update_ts TIMESTAMP DEFAULT current_timestamp NOT NULL
10
10
);
11
11
-- ----/*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
13
13
(' Homer' ,' Simpson' ),
14
14
(' Bart' ,' Simpson' ),
15
15
(' Lisa' ,' Simpson' );
You can’t perform that action at this time.
0 commit comments