This repository has been archived by the owner on Sep 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (54 loc) · 1.59 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version: '2'
services:
database_master_96:
build: database_master_96/
environment:
NODE_NAME: "master"
POSTGRES_PASSWORD: mysecretpassword
REP_USER: replication
REP_PASS: rep123
REP_PASS_MD5: e94f9a8965dd126eca6be98135abef0b
DB_NAME: example_db
DB_USER: example_user
DB_PASS: abc123
DB_PASS_MD5: 28d91d9f85d344cb91ae59a183de5358
volumes:
- ./database_master_96/init-master.sh:/docker-entrypoint-initdb.d/init.sh
- ./database_master_96:/tmp/postgresql
ports:
- 5431:5432
database_master:
build: database_master/
environment:
NODE_NAME: "master"
POSTGRES_PASSWORD: mysecretpassword
REP_USER: replication
REP_PASS: rep123
REP_PASS_MD5: e94f9a8965dd126eca6be98135abef0b
DB_NAME: example_db
DB_USER: example_user
DB_PASS: abc123
DB_PASS_MD5: 28d91d9f85d344cb91ae59a183de5358
volumes:
- ./database_master/init-master.sh:/docker-entrypoint-initdb.d/init.sh
- ./database_master:/tmp/postgresql
ports:
- 5433:5432
database_slave:
build: database_slave/
network_mode: "host"
environment:
NODE_NAME: "slave"
POSTGRES_PASSWORD: mysecretpassword
REP_USER: replication
REP_PASS: rep123
REP_PASS_MD5: e94f9a8965dd126eca6be98135abef0b
DB_NAME: example_db
DB_USER: example_user
DB_PASS: abc123
DB_PASS_MD5: 28d91d9f85d344cb91ae59a183de5358
volumes:
- ./database_slave/init-slave.sh:/docker-entrypoint-initdb.d/init.sh
- ./database_slave:/tmp/postgresql
ports:
- 5434:5432