Git Product home page Git Product logo

springboot-hello's Introduction

Deploy JAVA application spring-boot-hello in ec2 amazon linux/ubuntu instance..!!!

Pre-requisites:

  • Install GIT
    sudo yum install git -y
  • Install Maven
sudo yum install maven -y
  • Install Java17 amazon linux
  java --version
       yum list installed | grep java
       sudo yum remove <package-name>
       sudo yum install java-17-amazon-corretto
       sudo update-alternatives --config java  # change  java version
  • this is for jenkins integration add GIT Executable PATH in jenkins tools configuration that i.e /usr/bin/git
  • Install Java ubuntu linux
          java -version
         sudo apt install openjdk-17-jre-headless
          sudo apt remove <openjdk-8-jre-headless>
          update-java-alternatives --list
          sudo update-alternatives --config java
    
    
    

Clone code from github:

git clone https://github.com/vickydevo/springboot-hello.git
cd springboot-hello

Build Maven Artifact: below cmd can be done only when pom.xml is present

mvn clean install

Deploy springboot application:

cd target
java -jar gs-spring-boot-0.1.0.jar

# Run the application using nohup and &:
nohup java -jar gs-spring-boot-0.1.0.jar > output.log 2>&1 &
# List Java processes:
ps aux | grep java
jobs

http://public-ip:8080
http://localhost:8080

If you want to run Dockerfile-with-ARG-ENV file

docker build -t springboothello:v1 -f Dockerfile-with-ARG-ENV . --build-arg version=0.1.0

springboot-hello's People

Contributors

vickydevo avatar mukeshtestgit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.