Revert changes for replication, set settings to have default mode

This commit is contained in:
Thomas Rogers 2024-12-13 16:25:00 +01:00
parent 93d05c14e5
commit d9d0f01d8b
2 changed files with 14 additions and 1 deletions

View file

@ -23,6 +23,7 @@ export const appDataSource = new DataSource({
max: env.pg.pool.max,
idleTimeoutMillis: 10000, // 10 seconds
},
replication: env.pg.replication
? {
master: {
@ -42,5 +43,15 @@ export const appDataSource = new DataSource({
},
],
}
: undefined,
: {
defaultMode: 'master',
master: {
host: env.pg.host,
port: env.pg.port,
username: env.pg.userName,
password: env.pg.password,
database: env.pg.dbName,
},
slaves: [],
},
})

View file

@ -5,6 +5,8 @@ POSTGRES_PASSWORD=postgres
POSTGRES_DB=omnivore
PGPASSWORD=postgres
POSTGRES_USER=postgres
PG_REPLICATION=false
PG_HOST=postgres
PG_PASSWORD=app_pass
PG_DB=omnivore