Last active
August 10, 2019 16:40
-
-
Save viggy28/e3de61a2070f6171c966b16dc36a1d32 to your computer and use it in GitHub Desktop.
Keeping up haproxy config up to date with stolon on MacOS using https://github.com/UnitedTraders/stolon-standby-haproxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postgres_haproxy_port: 7432 | |
postgres_haproxy_config: '/Users/viggy28/haproxy/stolon_standby.cfg' | |
haproxy_reload_command: 'launchctl kickstart -k gui/501/viggy28.haproxy' | |
timeout: 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /Users/viggy28/haproxy/stolon_standby.cfg | |
frontend stolon_standby_frontend | |
mode tcp | |
bind *:7432 | |
use_backend stolon_standby_backend | |
backend stolon_standby_backend | |
mode tcp | |
balance roundrobin | |
server stolon_standby_1 127.0.0.1:5432 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /Users/viggy28/Library/LaunchAgents/viggy28.haproxy.plist | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>viggy28.haproxy</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/haproxy</string> | |
<string>-f</string> | |
<string>/Users/viggy28/haproxy/stolon_standby.cfg</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>StandardErrorPath</key> | |
<string>/Users/viggy28/haproxy/error.log</string> | |
<key>StandardOutPath</key> | |
<string>/Users/viggy28/haproxy/output.log</string> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: Remove the comments in the file which has an absolute path.
pgbouncer config (config.ini)