https://github.com/yahoo/elide-spring-boot-example
Spring Boot example using the Elide framework.
https://github.com/yahoo/elide-spring-boot-example
elide hacktoberfest
Last synced: 28 days ago
JSON representation
Spring Boot example using the Elide framework.
- Host: GitHub
- URL: https://github.com/yahoo/elide-spring-boot-example
- Owner: yahoo
- License: other
- Created: 2019-12-18T16:44:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-28T20:59:24.000Z (10 months ago)
- Last Synced: 2025-04-08T18:51:36.930Z (about 2 months ago)
- Topics: elide, hacktoberfest
- Language: Java
- Homepage: https://elide.io
- Size: 677 KB
- Stars: 17
- Watchers: 7
- Forks: 27
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: Code-Of-Conduct.md
Awesome Lists containing this project
README
# Elide Spring Boot Example
An archetype Elide project using Spring Boot.
[](https://cd.screwdriver.cd/pipelines/7924)
## Background
This project is the sample code for [Elide's Getting Started documentation](https://elide.io/pages/guide/v7/01-start.html).
## Install
To build and run:
1. mvn clean install
2. java -jar target/elide-spring-boot-1.0.0.jar
3. Browse http://localhost:8080/For API Versioning
1. Browse http://localhost:8080/?path=/v1
2. Browse http://localhost:8080/?path=/v2Springdoc is accessible at http://localhost:8080/swagger-ui/index.html.
## 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/
```
3. 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
```
4. Check logs of the container
```
docker logs -f 99998a35d377
```5. 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)
## UsageSee [Elide's Getting Started documentation](https://elide.io/pages/guide/v7/01-start.html).
## Contribute
Please refer to the [CONTRIBUTING.md](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](http://www.apache.org/licenses/LICENSE-2.0.html) open source license.
Please refer to [LICENSE](LICENSE.txt) for the full terms.