How to deploy .war file to a remote server on EC2?

Answered

I am able to output .war file locally. I'm trying to find the quickest way to copy-paste this `.war` file to /var/lib/tomcat/webapps/ from IntelliJ

So far, my solution is from Tool => Deployment => Configuration => Deployment => SFTP type connect => setup ssh with my .pem file on local machine. Finally, I set the Root path: as /var/lib/tomcat/webapps/. So then I can use Browse remote host to open /var/lib/tomcat/webapps/ and drag the .war file to it.

But this method is not ideal for me. I only saved some time out of ssh and scp. I believe there has to be a smarter way...Any ideas? Thanks in advance.

0
1 comment

You can use "Deployment" tab of the Tomcat Run/Debug configuration to define a deployment server and the artifact to be deployed: 

https://www.jetbrains.com/help/idea/working-with-artifacts.html#deploy_artifact

0

Please sign in to leave a comment.