forked from pavlospt/rust-pgdatadiff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
40 lines (39 loc) · 1.19 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
services:
postgres1:
image: public.ecr.aws/docker/library/postgres:16.2
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=example
logging:
options:
max-size: 10m
max-file: "3"
ports:
- '5438:5432'
volumes:
- ./postgres-data1:/var/lib/postgresql/data
# copy the sql script to create tables
- ./db/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql
# copy the sql script to fill tables
- ./db/fill_tables.sql:/docker-entrypoint-initdb.d/fill_tables.sql
postgres2:
image: public.ecr.aws/docker/library/postgres:16.2
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=example
logging:
options:
max-size: 10m
max-file: "3"
ports:
- '5439:5432'
volumes:
- ./postgres-data2:/var/lib/postgresql/data
# copy the sql script to create tables
- ./db/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql
# copy the sql script to fill tables
- ./db/fill_tables.sql:/docker-entrypoint-initdb.d/fill_tables.sql