Report this

What is the reason for this report?

deploy spring boot jar fie

Posted on March 10, 2017

Greetings.

I am considering opting $5 plan with digitalOcean.

I would like to know the following.

  • I have a spring boot generated jar file (jdk 1.7). How easy is it to deploy this jar in the host space?
  • my app uses mysql. How can I create a mysql db in digitalOcean and set my app to connect to this db?

thanks Balaji



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You can definitely host a Java app on a DigitalOcean. Make sure you follow the initial server setup tutorial after creating your Droplet.

See this tutorial on how to install MySQL. Once you’ve done that, you will want to create a MySQL user for your app. The hostname for the MySQL server will be localhost as it is running on the same server.

To run your app, install Java. You can transfer your .jar file using FileZilla or any other SFTP client. The login details will be the ones you created in the initial server setup tutorial. Run the jar using this command: java -jar file_name.jar.

To keep your app running after closing the SSH session, one option would be using the program screen.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.