Deploy a war file on Heroku

Hello. This time I will write an article on how to deploy a war file on Heroku. This time, after generating a war file in Eclipse, deploy the war file to Heroku.

Things necessary

You can deploy with three. ① Heroku account ② Developed Java application ③Eclipse

procedure

① Create a project on Heroku

"Create new app"-> Enter the app name in App name-> Press "Setting"-> Press "Add Buildpack"-> Select "Java" This time, the app name is "HerokuSampleProject".

スクリーンショット 2020-03-08 9.30.31.png

② Generate a war file with Eclipse

Right-click the project for which you want to generate a war file → click "Export" → click "war file" Then, a pop-up like the image below will be displayed, so after selecting the destination (this time I made it Desktop), press "Finish" スクリーンショット 2020-03-08 9.17.44.png

This time, the war file name is "HerokuSample.war". I'm sorry, the file name is "NewAccountBook_0307" in the image, but please ignore it ... Don't say it's a dumb name. Thank you very much.

③ Confirm that the war file generated this time is directly under Desktop

④ Move to Desktop at the terminal

$ cd Desktop

⑤ Log in to Heroku at the terminal

$ heroku login

⑥ Deploy the war file to Heroku

$ heroku deploy:war --war HerokuSample.war --app HerokuSampleProject;  

⑦ Try to access.

did it! !! !!

that's all. The war file was easy to deploy on Heroku, so I wrote this article.

Recommended Posts

Deploy a war file on Heroku
Deploy a Java web app on Heroku
Deploy a Tomcat-based Eclipse project on Heroku
To manually deploy Struts2 as a war file
How to deploy on heroku
How to deploy a simple Java Servlet app on Heroku
heroku deploy
Deploy Flask's Docker image on Heroku
Deploy Rails on Docker to heroku
Deploy your Rails app on Heroku
How to redo a deployment on Heroku
Deploy to Heroku [Ruby on Rails] Beginner
[Java] Deploy a web application created with Eclipse + Maven + Ontology on Heroku
heroku: docker: deploy
How to deploy a container on AWS Lambda
Deploy a Spring Boot application on Elastic Beanstalk
Steps to deploy to Heroku
How to deploy to Heroku from a local docker image
Introducing Bugsnag on Heroku
Deploy RAILS on EC2
Yay! I'm on Heroku!
Use Corretto 11 on Heroku
Create a Java Servlet and JSP WAR file to deploy to Apache Tomcat 9 in Gradle
Error resolution on Heroku
A collection of commands that were frequently used on heroku
How to deploy a kotlin (java) app on AWS fargate
How to deploy a Rails application on AWS (article summary)
Introduce Rails/Basic authentication on Heroku.
[Java] Create a temporary file
Post a video on rails
Use PG Backups on Heroku
How to deploy an app that references a local jar to heroku
I want to create a Servlet war file with OpenJDK on CentOS7. Without mvn. With no internet connection.