{"id":29406395,"url":"https://github.com/charlesmcmaponya/docker-ecs-react-app","last_synced_at":"2026-04-15T14:32:46.196Z","repository":{"id":303815741,"uuid":"1016664656","full_name":"CharlesMCMaponya/Docker-ecs-react-app","owner":"CharlesMCMaponya","description":"A production ready React app containerized with Docker, pushed to AWS ECR, and prepared for deployment to ECS (Fargate). Includes local Docker testing and structured for future Terraform IaC integration.","archived":false,"fork":false,"pushed_at":"2025-07-09T14:36:48.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-09T15:45:16.532Z","etag":null,"topics":["aws","aws-ecr","aws-ecs","cloud","containerization-with-docker","deployment","devops","docker","frontend","iac","reactjs","terraform"],"latest_commit_sha":null,"homepage":"","language":null,"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/CharlesMCMaponya.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,"zenodo":null}},"created_at":"2025-07-09T10:44:41.000Z","updated_at":"2025-07-09T15:26:06.000Z","dependencies_parsed_at":"2025-07-09T15:46:18.486Z","dependency_job_id":"b69f73c4-e3e3-4d2b-b6f4-c2dbaab04fd2","html_url":"https://github.com/CharlesMCMaponya/Docker-ecs-react-app","commit_stats":null,"previous_names":["charlesmcmaponya/docker-ecs-react-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CharlesMCMaponya/Docker-ecs-react-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesMCMaponya%2FDocker-ecs-react-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesMCMaponya%2FDocker-ecs-react-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesMCMaponya%2FDocker-ecs-react-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesMCMaponya%2FDocker-ecs-react-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CharlesMCMaponya","download_url":"https://codeload.github.com/CharlesMCMaponya/Docker-ecs-react-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesMCMaponya%2FDocker-ecs-react-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264686884,"owners_count":23649565,"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":["aws","aws-ecr","aws-ecs","cloud","containerization-with-docker","deployment","devops","docker","frontend","iac","reactjs","terraform"],"created_at":"2025-07-10T23:21:38.080Z","updated_at":"2026-04-15T14:32:46.148Z","avatar_url":"https://github.com/CharlesMCMaponya.png","language":null,"readme":"# 🐳 Dockerized React App with ECS Deployment\n\nThis project demonstrates how to containerize a **React** application using **Docker**, test it locally, and prepare for deployment to **AWS ECS Fargate** using **Terraform**.\n\n---\n\n## 📂 Project Structure\n\n```\ndocker-ecs-react-app/\n├── app/                    # React app (built using Create React App)\n│   ├── Dockerfile\n│   ├── package.json\n│   ├── public/\n│   ├── src/\n│   └── ...\n├── terraform/              # (Coming Soon) Terraform configs for AWS ECS + ECR\n├── screenshots/            # Project screenshots\n└── README.md               # This file\n```\n\n---\n\n## 🧱 Built With\n\n- ⚛️ React (via Create React App)\n- 🐳 Docker\n- ☁️ AWS ECR (Elastic Container Registry)\n- 🚀 AWS ECS (Elastic Container Service, Fargate)\n- 📜 Terraform (Infrastructure as Code — coming soon)\n\n---\n\n## 🐳 Docker Workflow\n\n### 🔨 Build Docker Image\n\n```bash\ndocker build -t react-docker-app .\n```\n\n### 🏃 Run Container Locally\n```bash\ndocker run -d -p 3000:80 --name react-docker-container react-docker-app\n```\nVisit: http://localhost:3000\n\n---\n\n## ☁️ Push to AWS ECR\n\n### Step 1: Create Repository\n```bash\naws ecr create-repository --repository-name react-docker-app --region us-east-1\n```\n\n### Step 2: Authenticate Docker\n```bash\naws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 188252831771.dkr.ecr.us-east-1.amazonaws.com\n```\n\n### Step 3: Tag Docker Image\n```bash\ndocker tag react-docker-app:latest 188252831771.dkr.ecr.us-east-1.amazonaws.com/react-docker-app:latest\n```\n\n### Step 4: Push to ECR\n```bash\ndocker push 188252831771.dkr.ecr.us-east-1.amazonaws.com/react-docker-app:latest\n```\n\n---\n\n## 🧹 Git Repository Cleanup\n\n### Problem: Large File in Git History\nDuring development, a large screenshot file (`screenshots/docker-build-success.png.jpg`) was accidentally committed, causing issues with repository size and push operations.\n\n### Solution: Using git-filter-repo\n**Step 1:** Install git-filter-repo\n```bash\npip install git-filter-repo\n```\n\n**Step 2:** Remove the large file from Git history\n```bash\ngit filter-repo --path screenshots/docker-build-success.png.jpg --invert-paths --force\n```\n\n**Step 3:** Re-add remote and push cleaned repository\n```bash\ngit remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO.git\ngit push origin main --force\n```\n\n### ⚠️ Important Notes:\n- This **permanently removes** the file from Git history\n- Always backup your repository before running cleanup commands\n- The `--force` flag is needed when working on your original repository\n- `git-filter-repo` removes remotes for safety - you need to add them back\n\n---\n\n## 📸 Screenshots\n\nAll screenshots are saved in the `screenshots/` folder:\n\n✅ Container running successfully  \n✅ ECR image successfully pushed  \n✅ Project folder view  \n\n---\n\n## 👤 Author\n\n**Mosehla Charles Maponya**\n\n---\n\n## 📄 License\n\nMIT – Free to use and modify.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesmcmaponya%2Fdocker-ecs-react-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharlesmcmaponya%2Fdocker-ecs-react-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesmcmaponya%2Fdocker-ecs-react-app/lists"}