Skip to content

Unable to use Peer auth #15

Open
Open

Description

@akdor1154

I want to have db-migrate authenticate by socket / peer auth, but this doesn't seem possible without hacking an env var.

const dbMigrateConfig = {
        default: 'local',
        local: {
              driver: 'pg',
              database: 'mydatabase',
              host: '/var/run/postgres',
              native: true
        }
};

'#ENOENT /var/run/postgres'

process.env['DBTEST'] = 'postgres:///${mydatabase}?host=/var/run/postgresql&native=true';
const dbMigrateConfig = {
        default: 'local',
        local: {
                ENV: "DBTEST"
        }
};

success.

Any chance the normal connection settings could allow connection via a socket?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Activity

  1. wzrdtales commented on Mar 19, 2017

    @wzrdtales
    Member

    if the library does not to decide to do this automatically like the mysql ones do on localhost hosts, there is currently no option. The db-config of the database.json gets passed in full to the pg module, though it might be possible already anyway, but can't tell for sure.

    Any suggestion how this could look like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions