{"id":20817195,"url":"https://github.com/kgoksal/react-app-project","last_synced_at":"2026-02-06T04:31:57.878Z","repository":{"id":254707407,"uuid":"847019734","full_name":"KGoksal/React-App-Project","owner":"KGoksal","description":"React.js application on AWS ECS Fargate, terraform scripts and Gitlab Pipeline","archived":false,"fork":false,"pushed_at":"2024-11-09T01:52:02.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T03:36:44.153Z","etag":null,"topics":["dockerfile","gitlab-ci","infrastructure","react","reactapp","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","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/KGoksal.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":"2024-08-24T16:08:17.000Z","updated_at":"2024-11-09T01:52:05.000Z","dependencies_parsed_at":"2024-08-25T14:59:33.990Z","dependency_job_id":"1109c606-97bf-4059-8cd2-ea300234b0c0","html_url":"https://github.com/KGoksal/React-App-Project","commit_stats":null,"previous_names":["kgoksal/react-app-project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KGoksal/React-App-Project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KGoksal%2FReact-App-Project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KGoksal%2FReact-App-Project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KGoksal%2FReact-App-Project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KGoksal%2FReact-App-Project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KGoksal","download_url":"https://codeload.github.com/KGoksal/React-App-Project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KGoksal%2FReact-App-Project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29150634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T02:39:25.012Z","status":"ssl_error","status_checked_at":"2026-02-06T02:37:22.784Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dockerfile","gitlab-ci","infrastructure","react","reactapp","terraform"],"created_at":"2024-11-17T21:39:49.429Z","updated_at":"2026-02-06T04:31:57.863Z","avatar_url":"https://github.com/KGoksal.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React DevOps Case Study\r\nThis project demonstrates the complete DevOps lifecycle of a simple React.js application, from development to deployment, utilizing Docker, GitLab CI/CD pipelines, AWS ECS Fargate with Terraform, and Kubernetes. The goal is to establish a secure and scalable cloud infrastructure and automate the deployment process following DevOps best practices.\r\n## Table of Contents\r\n1. [Overview](#overview)\r\n2. [Technologies Used](#technologies-used)\r\n3. [Dockerfile](#dockerfile)\r\n4. [GitLab CI/CD Pipeline](#gitlab-cicd-pipeline)\r\n5. [AWS ECS Fargate Deployment](#aws-ecs-fargate-deployment)\r\n6. [Kubernetes Deployment](#kubernetes-deployment)\r\n7. [Infrastructure Provisioning with Terraform](#infrastructure-provisioning-with-terraform)\r\n8. [Project Setup](#project-setup)\r\n9. [Security Considerations](#security-considerations)\r\n10. [Conclusion](#conclusion)\r\n## Overview\r\nThis case study covers the entire DevOps pipeline for deploying a simple React.js application. The process starts by building a Docker container, setting up continuous integration and deployment using GitLab CI/CD, and deploying the application to AWS ECS Fargate using Terraform for infrastructure automation. Additionally, the app is deployed to a Kubernetes cluster using manifests and necessary resources for external access.\r\n## Technologies Used\r\n- **React.js** (Frontend)\r\n- **Docker** (Containerization)\r\n- **GitLab CI/CD** (Pipeline automation)\r\n- **AWS ECS Fargate** (Container orchestration)\r\n- **Terraform** (Infrastructure as Code)\r\n- **Kubernetes** (Cluster orchestration)\r\n- **AWS ALB** (Application Load Balancer for traffic management)\r\n## Dockerfile\r\nThe `Dockerfile` is written to ensure minimal image size and security.\r\n```\r\nDockerfile\r\n# Use official lightweight Node.js base image\r\nFROM node:16-alpine AS build\r\n# Set working directory\r\nWORKDIR /app\r\n# Copy package.json and install dependencies\r\nCOPY package.json yarn.lock ./\r\nRUN yarn install --frozen-lockfile\r\n# Copy app files\r\nCOPY . .\r\n# Build the app\r\nRUN yarn build\r\n# Serve the app using a lightweight web server\r\nFROM nginx:stable-alpine\r\n# Copy the build files from the previous stage\r\nCOPY --from=build /app/build /usr/share/nginx/html\r\n# Expose port 80 to access the app\r\nEXPOSE 80\r\n# Start the server\r\nCMD [\"nginx\", \"-g\", \"daemon off;\"]\r\n```\r\n- Multi-stage build is used to keep the final image size small.\r\n- Dependencies are installed in the first stage, and the app is built in a secure, isolated environment.\r\n- The final image only contains the build files and Nginx for serving, reducing attack surface and ensuring a small, efficient production image.\r\n## Key Stages:\r\n- Build Stage: Builds the Docker image.\r\n- Test Stage: Runs basic tests to ensure the app is functional.\r\n- Deploy to AWS: Deploys the Docker container to AWS ECS Fargate.\r\n- Deploy to Kubernetes: Deploys the containerized app to a Kubernetes cluster.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgoksal%2Freact-app-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkgoksal%2Freact-app-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgoksal%2Freact-app-project/lists"}