Steps needed to deploy war on Heroku

五迷三道 提交于 2019-12-30 04:58:06

问题


I have spring source tool with Maven. And I have one Java project which I want to deploy on Heroku. Can anybody tell me steps to deploy on Heroku?

Many Thanks


回答1:


  1. Create war file in Maven. You can do this by referring here
  2. Install the Heroku Toolbelt from here
  3. open the command prompt (for Windows) and type $heroku login
    it will prompt to enter user name and password. Enter the credentials of your heroku account.
  4. Now, to install the heroku-deploy plugin, enter the code:
    $ heroku plugins:install heroku-cli-deploy
  5. Now deploy the war file to the heroku server by this code:
    $ heroku deploy:war --war <path_to_war_file> --app <app_name>
  6. If you are in an application directory, the --app parameter can be omitted:
    $ heroku deploy:war --war <path_to_war_file>

Your App will be successfully deployed to the heroku server.




回答2:


It's all well explained here :

https://devcenter.heroku.com/articles/java




回答3:


How to deploy war file to Heroku

  • Register Heroku account
  • Install heroku-cli
  • Install JDK if needed
  • Install heroku-cli-deploy plugin using command: heroku plugins:install heroku-cli-deploy
  • Login to heroku in command line: heroku login
  • Create app using command: heroku apps:create <app_name>
  • Deploy war file using this command: heroku war:deploy <path_to_war_file> --app <app_name>
  • Open app using command: heroku open -a <app_name>

Reference

  • Heroku Deploy War/Jar



回答4:


This url shows exactly how to deploy a war file on heroku:

https://github.com/heroku/heroku-deploy



来源:https://stackoverflow.com/questions/9923486/steps-needed-to-deploy-war-on-heroku

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!