I have setup the postgres with repmgr and Configured as Replication and Failover between two servers , The Failover Setup is working fine. The Connection string of Postgres is given below.
postgres://repmgr:[email protected]:5432,10.200.0.120:5432/Stag_DB
when I tried to setup the strapi with this postgres string , I have not found any article to connect postgres string with strapi. I am following this link https://strapi.io/documentation/developer-docs/latest/setup-deployment-guides/configurations.html#database only found database.js file in strapi project which connect one DB at one time.
defaultConnection: 'default',
connections: {
default: {
connector: 'bookshelf',
settings: {
client: 'postgres',
host: env('DATABASE_HOST', 'localhost'),
port: env.int('DATABASE_PORT', 5432),
database: env('DATABASE_NAME', 'strapi'),
username: env('DATABASE_USERNAME', 'strapi'),
password: env('DATABASE_PASSWORD', 'strapi'),
schema: env('DATABASE_SCHEMA', 'public'), // Not Required
ssl: {
rejectUnauthorized: env.bool('DATABASE_SSL_SELF', false), // For self-signed certificates
},
},
options: {
ssl: env.bool('DATABASE_SSL', false),
},
},
},
});
This will only connect one DB at one time Please Help me to connect this string postgres://repmgr:[email protected]:5423,10.200.0.120:5423/Stag_DB
on strapi.
I've tried it with mongodb database, I don't know it might work in postgre, but here the step :