It seems, the only way to set db connection parameters is to specify config.json file. But, in some cases you don't need to handle environment in app yourself. So, I'm interested is there any way to set connection parameters explicitly via environment variables. Something like that:
.sequelizerc:
var path = require('path')
module.exports = {
'config': {
host: process.env.DB0_HOST,
port: process.env.DB0_PORT,
database: process.env.DB0_NAME,
username: process.env.DB0_USERNAME,
password: process.env.DB0_PASSWORD,
dialect: "postgres"
},
'migrations-path': path.resolve('coffee/server', 'migrations'),
'models-path': path.resolve('coffee/server', 'models'),
'coffee': true
}
Thanks :)
May I point you to this comment? https://github.com/sequelize/cli/issues/77#issuecomment-68299495
Please let me know if this works for you and I will add it to the readme.
Closing this for now. Please re-open if it is still an issue
A bit late, but exactly what I needed! xD Thanks.
BTW, it may be useful to mention this approach in docs.
I'd leave ^ as a thumbs-up, but I believe it might be valuable for the maintainers to know that I came to here after thinking of the same question while reading http://docs.sequelizejs.com/manual/tutorial/migrations.html.
Most helpful comment
A bit late, but exactly what I needed! xD Thanks.
BTW, it may be useful to mention this approach in docs.