-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
47 lines (43 loc) · 970 Bytes
/
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
41
42
43
44
45
46
version: "3.3"
services:
pg_master:
image: lucasfs/pg-pi_master
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=testdb
- PG_REP_USER=rep
- PG_REP_PASSWORD=postgres
volumes:
- /mnt/storage/pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- pg-net
deploy:
placement:
constraints:
- node.labels.type == primary
pg_slave:
image: lucasfs/pg-pi_slave
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=testdb
- PG_REP_USER=rep
- PG_REP_PASSWORD=postgres
- PG_MASTER_HOST=pg_master
volumes:
- /mnt/storage/pgdata:/var/lib/postgresql/data
ports:
- "5433:5432"
networks:
- pg-net
deploy:
placement:
constraints:
- node.labels.type == worker
networks:
pg-net:
external:
name: pgnet