Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud-Native Web Application | AWS & Docker Architecture Showcase

Docker AWS NodeJS React

A production-grade, containerized full-stack web application deployed entirely on Amazon Web Services (AWS). This repository is primarily a showcase of advanced DevOps engineering, emphasizing scalable cloud infrastructure, strict network security, and highly optimized multi-stage container builds.

🔗 Live Production Endpoint


🏗️ Cloud Infrastructure & DevOps Engineering

This project moves beyond local development to demonstrate how modern applications are architected for high availability and security in the cloud.

1. Advanced Containerization (Docker)

  • Multi-Stage Builds: Engineered a layered Dockerfile to separate the build environment from the runtime environment. The frontend is compiled in an isolated Node container, and only the finalized static assets (/dist) are injected into the backend serving container. This drastically reduces the final image size and attack surface.
  • Cross-Platform Compilation: Utilized docker buildx with the --platform linux/amd64 flag to ensure the image architecture perfectly matches the AWS cloud hardware, eliminating local-to-cloud architecture mismatch errors.
  • Cache & Context Optimization: Implemented strict .dockerignore rules to prevent local node_modules and environment variables from polluting the container registry.

2. Serverless Cloud Architecture (AWS ECS Fargate)

  • Elastic Container Registry (ECR): Secured private registry for storing and versioning the compiled production images.
  • Elastic Container Service (ECS) with Fargate: Deployed the container using AWS Fargate for a fully serverless execution layer, removing the operational overhead of provisioning and managing underlying EC2 instances.
  • Granular IAM Security: Configured strict Identity and Access Management (IAM) policies. Separated Task Execution Roles (allowing ECS to pull from ECR) from Task Roles (application-level permissions) to adhere to the Principle of Least Privilege.

3. Secure Cloud Networking (AWS VPC & ALB)

  • Virtual Private Cloud (VPC): Provisioned a custom VPC with dedicated public subnets attached to an Internet Gateway for isolated execution.
  • Application Load Balancer (ALB): Placed an internet-facing ALB in front of the ECS cluster. The ALB safely intercepts external Port 80 traffic and forwards it to the container's internal Port 3000.
  • Stateful Firewalls (Security Groups): Configured strict AWS Security Groups to drop unauthorized inbound traffic, ensuring the container instances can only be accessed via the Load Balancer.

📂 Multi-Stage Dockerfile Blueprint

# ---------- FRONTEND BUILD ----------
FROM node:20-alpine AS frontend-builder
WORKDIR /app

COPY frontend/package*.json ./
RUN npm install

COPY frontend .
RUN npm run build

# ---------- BACKEND BUILD ----------
FROM node:20-alpine


WORKDIR /app

COPY backend/package*.json ./
RUN npm install


COPY backend .
COPY --from=frontend-builder /app/dist ./public
EXPOSE 3000

CMD ["node", "server.js"]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages