How can I run sequelize db:migrate on ElasticBeanstalk with env vars?
Running sequelize migrate fails since it cannot find the .env
file.<
I resolve this error through running command in .ebextension/config_file.sh node vsersion is same which is using in the EB console
files: "/opt/elasticbeanstalk/hooks/appdeploy/pre/config_file.sh":
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash
curl --silent --location https://rpm.nodesource.com/setup_12.x | sudo bash -
sudo yum -y install nodejs
then
run command on terminal in your app directory:
./node_modules/.bin/sequelize db:migrate
its work for me!!