{"id":21364804,"url":"https://github.com/moshclouds/nimbusecr","last_synced_at":"2026-04-18T14:31:42.494Z","repository":{"id":263616675,"uuid":"890681888","full_name":"moshclouds/NimbusECR","owner":"moshclouds","description":"Welcome to NimbusECR! This project demonstrates a full CI/CD pipeline using GitHub Actions to build and push a Dockerized Spring Boot application to Amazon Elastic Container Registry (ECR). 🌩️","archived":false,"fork":false,"pushed_at":"2024-11-19T13:36:46.000Z","size":597,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-22T19:48:49.166Z","etag":null,"topics":["actions","docker","ecr","iam","java","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moshclouds.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-19T01:56:49.000Z","updated_at":"2024-11-19T13:36:50.000Z","dependencies_parsed_at":"2024-11-19T14:55:32.681Z","dependency_job_id":null,"html_url":"https://github.com/moshclouds/NimbusECR","commit_stats":null,"previous_names":["moshclouds/nimbusecr"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moshclouds%2FNimbusECR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moshclouds%2FNimbusECR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moshclouds%2FNimbusECR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moshclouds%2FNimbusECR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moshclouds","download_url":"https://codeload.github.com/moshclouds/NimbusECR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243839205,"owners_count":20356182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","docker","ecr","iam","java","spring-boot"],"created_at":"2024-11-22T07:07:45.514Z","updated_at":"2026-04-18T14:31:42.421Z","avatar_url":"https://github.com/moshclouds.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# NimbusECR 🚀  \n\nWelcome to **NimbusECR**! This  project demonstrates a full CI/CD pipeline using **GitHub Actions** to build and push a Dockerized Spring Boot application to **Amazon Elastic Container Registry (ECR)**. 🌩️\n\n\u003cimg width=\"960\" alt=\"18 (3)\" src=\"https://github.com/user-attachments/assets/56f352b7-4a7c-44d5-8990-c72d1abb85d9\"\u003e\n\n## 📜 Table of Contents  \n- [About the Project](#about-the-project)  \n- [Features](#features)  \n- [Prerequisites](#prerequisites)  \n- [Getting Started](#getting-started)  \n- [CI/CD Workflow Details](#cicd-workflow-details)  \n- [Directory Structure](#directory-structure)  \n- [Built With](#built-with)  \n\n---\n\n## 🔍 About the Project  \n\n**NimbusECR** is a starter Spring Boot REST API application with a `hello world` endpoint, designed to showcase the following:  \n- Building a Spring Boot application using **Maven**  \n- Containerizing the application with **Docker**  \n- Pushing the image to **Amazon Elastic Container Registry (ECR)** using **GitHub Actions**  \n- Deploying and running the container on local or cloud environments  \n\n---\n\n## ✨ Features  \n- 🌱 **Lightweight Spring Boot Starter App**: Minimalistic REST API for easy understanding.  \n- 🐋 **Dockerized Build**: Containerized application for consistent deployments.  \n- ☁️ **ECR Integration**: Pushes the Docker image to Amazon ECR seamlessly.  \n- 🤖 **Automated CI/CD**: Utilizes GitHub Actions for build and push automation.  \n\n---\n\n## 🛠️ Prerequisites  \n\nBefore you begin, ensure you have the following:  \n1. **AWS IAM User**:  \n   - The IAM user should have the `AmazonEC2ContainerRegistryFullAccess` policy attached.  \n2. **AWS CLI**: Installed and configured with credentials for the IAM user.  \n3. **GitHub Secrets**: Set up the following secrets in your GitHub repository:  \n   - `AWS_ACCESS_KEY_ID`  \n   - `AWS_SECRET_ACCESS_KEY`  \n   - `AWS_REGION`  \n   - `AWS_ECR_REGISTRY`: The AWS account ID.  \n   - `AWS_ECR_REPO_NAME`: The name of your ECR repository.  \n\n4. **Docker**: Installed and configured on your local machine if you want to run the image locally.  \n\n---\n\n## 🚀 Getting Started  \n\n### **Clone the Repository**  \n```bash\ngit clone https://github.com/your-username/nimbus-ecr.git\ncd nimbus-ecr\n```\n\n### **Run Locally**  \n1. **Build the Project**:  \n   ```bash\n   mvn clean install\n   ```  \n\n2. **Build and Run Docker Container**:  \n   ```bash\n   docker build -t nimbusecr:local .\n   docker run -p 8080:8080 nimbusecr:local\n   ```  \n\n3. **Access the Endpoint**:  \n   Open your browser or use `curl` to hit:  \n   ```bash\n   curl http://localhost:8080/hello\n   ```  \n\n---\n\n## 🤖 CI/CD Workflow Details  \n\n### **GitHub Actions Workflow**  \nThe `.github/workflows/main.yml` file defines the CI/CD pipeline. Below is an explanation of each step:  \n\n1. **Check Out the Code**:  \n   Uses `actions/checkout@v4` to pull the code from the repository.  \n\n2. **Set Up JDK**:  \n   Installs OpenJDK 21 to build the Spring Boot application.  \n\n3. **Clean Build Directory**:  \n   Removes any previous build artifacts using `mvn clean`.  \n\n4. **Build Project**:  \n   Builds the Spring Boot JAR file using `mvn install`.  \n\n5. **Configure AWS Credentials**:  \n   Configures GitHub Actions to use your AWS credentials.  \n\n6. **Login to Amazon ECR**:  \n   Authenticates Docker to your Amazon ECR repository.  \n\n7. **Build and Push Docker Image**:  \n   - Builds the Docker image for the application.  \n   - Pushes the image to your specified Amazon ECR repository.  \n\n---\n\n## 🗂️ Directory Structure  \n\n```\nnimbus-ecr/\n├── src/                   # Application source code\n│   ├── main/\n│   │   ├── java/\n│   │   │   └── com.example.demo/ # Your Spring Boot code\n│   │   └── resources/     # Application resources\n├── target/                # Compiled JAR and build artifacts\n├── Dockerfile             # Docker configuration file\n├── pom.xml                # Maven project file\n└── .github/\n    └── workflows/\n        └── main.yml       # CI/CD workflow file\n```\n\n---\n\n## 🛠️ Built With  \n\n- **Spring Boot**: A Java framework for building RESTful APIs.  \n- **Maven**: Dependency and build management.  \n- **Docker**: Containerization platform.  \n- **Amazon ECR**: Secure container registry.  \n- **GitHub Actions**: CI/CD automation.  \n\n---\n\n## 📜 Example API Endpoint  \n\nThe application exposes a simple REST API:  \n\n### `GET /`  \n\n**Response**:  \n```json\n{\n  \"message\": \"server, online!\"\n}\n```\n\n---\n\n## 🎉 Contributing  \n\nContributions are welcome! If you find any issues or have suggestions, feel free to open an issue or a pull request.  \n\n---\n\n### 🚀 Ready to Deploy  \n\nOnce the Docker image is pushed to Amazon ECR, you can pull it and run it locally or deploy it in your AWS environment.  \n\n```bash\n# Authenticate Docker\naws ecr get-login-password --region \u003cyour-region\u003e | docker login --username AWS --password-stdin \u003cyour-ecr-uri\u003e\n\n# Pull the image\ndocker pull \u003cyour-ecr-uri\u003e:\u003ctag\u003e\n\n# Run the container\ndocker run -p 8080:8080 \u003cyour-ecr-uri\u003e:\u003ctag\u003e\n```\n---\n### Proof Of Concepts\n\n\u003cimg width=\"1512\" alt=\"iam_user\" src=\"https://github.com/user-attachments/assets/f6c1721a-2d6a-454c-8e67-f017fc495615\"\u003e\n\u003cbr\u003e\n\u003cimg width=\"1465\" alt=\"image_ecr\" src=\"https://github.com/user-attachments/assets/c1c08002-b48b-489f-8974-a81a33d8545e\"\u003e\n\u003cbr\u003e\n\u003cimg width=\"1547\" alt=\"local_docker_logs\" src=\"https://github.com/user-attachments/assets/5681789a-89b9-44a0-a4bd-f00d8b0ab667\"\u003e\n\u003cbr\u003e\n\u003cimg width=\"1547\" alt=\"local_docker_logs\" src=\"https://github.com/user-attachments/assets/0e18dcdf-ad65-4432-b8ec-953e516a5d78\"\u003e\n\u003cbr\u003e\n\u003cimg width=\"1342\" alt=\"auth_ECR\" src=\"https://github.com/user-attachments/assets/767bae3a-88fb-4b40-a3de-4034d7debae9\"\u003e\n\u003cbr\u003e\n\u003cimg width=\"1467\" alt=\"ecr_repo\" src=\"https://github.com/user-attachments/assets/a38e6a8e-5dce-4297-a4d3-0cb6419d2d12\"\u003e\n\u003cbr\u003e\n\u003cimg width=\"1122\" alt=\"create_aws_ecr_repo\" src=\"https://github.com/user-attachments/assets/38157692-f08f-4e09-94a7-378bd9d0412b\"\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoshclouds%2Fnimbusecr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoshclouds%2Fnimbusecr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoshclouds%2Fnimbusecr/lists"}