GithubHelp home page GithubHelp logo

moizarafat / elide-spring-boot-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yahoo/elide-spring-boot-example

0.0 0.0 0.0 580 KB

Spring Boot example using the Elide framework.

Home Page: https://elide.io

License: Other

Java 64.30% HTML 31.32% Dockerfile 4.39%

elide-spring-boot-example's Introduction

Elide Spring Boot Example

An archetype Elide project using Spring Boot.

Build Status

Background

This project is the sample code for Elide's Getting Started documentation.

Install

To build and run:

  1. mvn clean install
  2. java -jar target/elide-spring-boot-1.0.jar
  3. Browse http://localhost:8080/

Docker and Containerize

To containerize and run elide project locally

  1. Build Docker Image from Root of the project

    docker build -t elide/elide-spring-boot-example .
    
  2. Run docker container locally

    docker run -p 8081:8080 -d elide/elide-spring-boot-example
    
  3. Application should be running in

    http://localhost:8081/
    
  4. Check Docker containers running

    docker ps
    CONTAINER ID   IMAGE                             COMMAND                  CREATED         STATUS         PORTS                     NAMES
    99998a35d377   elide/elide-spring-boot-example   "java -cp app:app/li…"   6 seconds ago   Up 5 seconds   0.0.0.0:8089->8080/tcp    upbeat_lehmann
    
  5. Check logs of the container

    docker logs -f 99998a35d377 
    
  6. If you want to ssh to your docker container for more troubleshooting

     docker exec -it 99998a35d377 /bin/sh
    

Run from cloud (AWS)

  1. ECR
    1. Create a repository in Elastic Container Registry with name elide-spring-boot-example
    2. aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin xxx.dkr.ecr.us-east-1.amazonaws.com
    3. docker tag elide-spring-boot-example:latest xxx.dkr.ecr.us-east-1.amazonaws.com/elide-spring-boot-example:latest
    4. docker push xxx.dkr.ecr.us-east-1.amazonaws.com/elide-spring-boot-example
  2. Fargate
    1. With the image on AWS ECR, you can now define your deployment on AWS ECS/Fargate.
    2. Make sure to mention ECR details
    3. Port mapping is needed in the task definition. If you open the json definition of the task, you can edit to add this. "portMappings": [ { "hostPort": 8080, "protocol": "tcp", "containerPort": 8080 } ],
    4. The security group created or used for the task , needs to have inbound rule for TCP custom port 8080 , CIDR block 0.0.0.0/0(open to everyone, or you can add your company's CIDR block if its an internal service)

Usage

See Elide's Getting Started documentation.

Contribute

Please refer to the contributing.md file for information about how to get involved. We welcome issues, questions, and pull requests.

License

This project is licensed under the terms of the Apache 2.0 open source license. Please refer to LICENSE for the full terms.

elide-spring-boot-example's People

Contributors

moizarafat avatar aklish avatar vandanabhandari avatar jkusa avatar codingwhatever 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.