Skip to content

Commit

Permalink
use DB_URL insteadof shit
Browse files Browse the repository at this point in the history
  • Loading branch information
sasumaki committed Jun 18, 2019
1 parent 435f102 commit d00182c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
4 changes: 2 additions & 2 deletions services/backend/updater_writer/database/dump_database.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit d00182c

Please sign in to comment.