How can I run sequelize db:migrate on ElasticBeanstalk with env vars?
Running sequelize migrate fails since it cannot find the .env
file.
{ Error: ENOENT: no such file or directory, open '.env'
my master.config looks like:
container_commands:
00_node_binary:
command: "ln -sf `ls -td /opt/elasticbeanstalk/node-install/node-* | head -1`/bin/node /bin/node"
00_npm_binary:
command: "ln -sf `ls -td /opt/elasticbeanstalk/node-install/node-* | head -1`/bin/npm /bin/npm"
01_migrations:
command: npm run migrate
leader_only: true
and my package.json contains
"migrate": "node_modules/sequelize-cli/bin/sequelize db:migrate"