DEV Community

realninety5
realninety5

Posted on

1

How to deploy a Spring-boot jar file to ElasticBeanstalk

Cloud has made procuring environments and deploying applications to them a lot easier than it used to be, providing us with different cloud deployments models like IaaS, Paas and Saas. Today we will look at the AWS ElasticBeanstalk, a PaaS (Platform as a Service) that provides us with a ready environment to deploy our applications.

Elastic beanstalk nginx listens on port 5000 so, ensure to make your application listen on port 5000 by adding

server:
   port: 5000
Enter fullscreen mode Exit fullscreen mode

to your application.yaml file or by adding the key "SERVER_PORT" and the value "5000" to the software tab in the configuration tab of your environment on the elastic beanstalk.

After developing your Spring-boot applications, run

mvn install

Go to aws' elastic beanstalk website and create a new application

  • enter the application’s name
  • choose "java" as the platform and choose the java version your application is running on.
  • click on "Upload your code" to select your packaged jar file and wait for the application to be deployed.

You can now click on the application URL provided by elastic beanstalk to access your application

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more