📜 ⬆️ ⬇️

Java Spring application in PaaS-platform Heroku in 14 minutes



Hello!
I continue the series of publications on the project
Maven / Spring / Security / JPA (Hibernate) / Rest (Jackson) / Bootstrap (CSS) / jQuery + plugins
( source code on github ).

Previous publications:

The final part of the project: deploy to Heroku cloud PaaS platform


Instructions on steps (from video):


  1. Make an account on Heroku ;
  2. Create a Personal App in it and connect it to your project in GitHub;
  3. Add Add-ons: database;
  4. Create a Data Source to the database in IDEA, take the base credit from the environment variable DATABASE_URL;
  5. In DataSource -> Advanced add ssl = true, sslfactory = org.postgresql.ssl.NonValidatingFactory;
  6. Run the sql-script initialization to the database Heroku;
  7. Configure Heroku in the project:
  8. Test Heroku actions locally via .bat (.sh) ;
  9. Make commit + push to GitHub;
  10. Optional:
    • To view the application log install Heroku Toolbelt ;
    • If the application has external resources available via the environment variable, configure it in Heroku: Settings-> Config Vars-> PROJECT_ROOT = / app
    • Configure ERROR_PAGE_URL
    • Connect Heroku to IDEA : add plugin and generated keys
  11. Make manual deploy from GitHub to Heroku;
  12. Run in browser: [your_application_name] .herokuapp.com
  13. Do not forget to congratulate yourself: now the whole world will see your application :)

Well and the last: some resources on Heroku and PaaS comparison



Thanks for attention!

')

Source: https://habr.com/ru/post/265591/


All Articles