From d00182c1505d0c68a1c252f2b866c7c46145ca6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A4kinen=20Sasu=20S?= Date: Tue, 18 Jun 2019 18:01:16 +0300 Subject: [PATCH] use DB_URL insteadof shit --- docker-compose.yml | 3 --- services/backend/updater_writer/database/dump_database.js | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) 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) => {