Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use Peer auth #15

Open
akdor1154 opened this issue Feb 19, 2017 · 1 comment
Open

Unable to use Peer auth #15

akdor1154 opened this issue Feb 19, 2017 · 1 comment

Comments

@akdor1154
Copy link

akdor1154 commented Feb 19, 2017

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.

@wzrdtales
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants