Skip to content

Commit

Permalink
Set PROD_STANDY to read the production database
Browse files Browse the repository at this point in the history
- 172.17.0.1 is the default gateway of Docker bridge network
- 54321 is an arbitrary port for an SSH tunnel that can be created with:

    ssh -L 172.17.0.1:54321:localhost:65400 pink -N # production slave

It depends on metabrainz/musicbrainz-server#1337
  • Loading branch information
yvanzo committed Mar 19, 2020
1 parent 594338e commit 5bd3675
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build/musicbrainz-dev/DBDefs.pm
Expand Up @@ -84,6 +84,14 @@ MusicBrainz::Server::DatabaseConnectionFactory->register_databases(
host => "db",
port => "5432",
},
# How to connect for read-only access to the production database.
PROD_STANDBY => {
database => "musicbrainz_db",
username => "musicbrainz_ro",
password => "",
host => "172.17.0.1",
port => "54321",
},
# How to connect for administrative access
SYSTEM => {
database => "template1",
Expand Down

0 comments on commit 5bd3675

Please sign in to comment.