diff --git a/docker-compose.yml b/docker-compose.yml index 36e8e299a5..41a263bb48 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -258,9 +258,6 @@ services: DB_URL: postgres://postgres@db:5432/tkt_oodi TEST_DB: postgres://postgres@db:5432/tkt_oodi_test TEST_DB_SCHEMA: updater_test - HOST: db - USER: postgres - DBNAME: tkt_oodi DB_SCHEMA_KONE: kone_data diff --git a/services/backend/updater_writer/database/dump_database.js b/services/backend/updater_writer/database/dump_database.js index 71d0c9355f..30eb0e1ca1 100644 --- a/services/backend/updater_writer/database/dump_database.js +++ b/services/backend/updater_writer/database/dump_database.js @@ -4,8 +4,8 @@ const { sync } = require('./force_sync_database') const { DB_SCHEMA } = require('../conf-backend') const dumpDatabase = async () => { - const { USER, HOST, DBNAME } = process.env - const dumpOptions = ['-Fc', `-U${USER}`, `--host=${HOST}`, `-n${DB_SCHEMA}`, `${DBNAME}`] + const { DB_URL } = process.env + const dumpOptions = ['-Fc', `-n${DB_SCHEMA}`, `${DB_URL}`] console.log(dumpOptions) const dumpProcess = spawn('pg_dump', dumpOptions, { stdio: ['ignore', 'pipe', 'inherit'] }) dumpProcess.on('error', (err) => {