decidim-install
decidim-install copied to clipboard
How to update decidim with aws elasticbeanstalk ?
Hi, I followed the update manual https://github.com/Platoniq/decidim-install/blob/master/decidim-update.md but I am not sure if it's the same procedure with elasticbeanstalk ? I am new with ruby on rails so everything is a bit tricky for me.
When I did locally :
bundle update decidim bin/rails decidim:upgrade bin/rails db:migrate
I got :
bin/rails db:migrate rails aborted! PG::ConnectionBad: fe_sendauth: no password supplied bin/rails:4:in `
' Tasks: TOP => db:migrate
If I understand, the problem is because I don't have the postgredb configured correctly locally right ? It's normal because I followed the elasticbeanstalk manual only. So I have to follow the classic procedure to have a local install also right ? Then what is the procedure to update on elasticbean. Git push and deploy only or should I do something in the eb console ? Sorry if my question are a beat obvious !
in aws is easier, wherever you deploy the application the db:migrate command is run automatically. What you need to do is to prepare it locally, then commit the changes, push it and deploy:
bundle update decidim
bin/rails decidim:upgrade
git add .
git commit -m "Update to verxion 0.XX"
git push
eb deploy
As you can see there's no db:migrate, this will be run in during deployment by AWS. You can still run it locally (which is recommended), but first you need your development environment well prepared.
You can still run it locally (which is recommended), but first you need your development environment well prepared.
Great, thanks, it's work well. So to have a development environment working with EB, I just need to follow https://github.com/decidim/decidim/blob/master/docs/manual-installation.md, right ? And the things with Figaro ? I was afraid of breaking everything :)
Yes, You can configure separate environments, you can use the figaro gem only under the section :development in the Gemfile if you want.
Another alternative is to use a .rbenv-vars
with the database credentials of your development database. The last is the option I'd recommend for being the most practical, but you need to follow the instructions here: https://github.com/rbenv/rbenv-vars