PostgreSQL Streaming Replication With Docker
The *.txt files here hold user and database parameters. Specifically, replication.txt
contains the user/role and password to use for replication. Whereas database.txt
contains an initial database, user/role and password to create on the master.
Run the master:
$ fig run -d master
Wait for it to start up completely. Start the slave:
$ fig run slave
Wa-la!
This comment has been minimized.
volkanunsal commentedApr 7, 2015
Very helpful! But I'm curious why you didn't add the ENV variables into the yaml file, but instead read them from plaintext files?
Also where is
MASTER_PORT_5432_TCP_ADDR
coming from?