DEV Community

Azmat Ahmed
Azmat Ahmed

Posted on

πŸš€ Docker in DevOps – Node.js Deployment on AWS EC2 (Week 12 Journey)

πŸš€ Docker in DevOps – Node.js Deployment on AWS EC2 (Week 12 Journey)

In Week 12 of my DevOps journey, I focused on Docker and successfully deployed a Node.js app on AWS EC2.


πŸ”Ή What I Did

  • Wrote a Dockerfile with Node.js as the base image.
  • Installed dependencies automatically with:

dockerfile
  COPY package*.json ./
  RUN npm install
Built image:

bash
Copy code
docker build -t my-node-app .
Ran container:

bash
Copy code
docker run -p 3000:3000 my-node-app
Configured AWS EC2 security groups for port 3000.

πŸ”Ή Why Docker?
Removes manual setup

Creates consistent environments

Speeds up deployments

Root tool of DevOps automation

πŸ“‚ Links
πŸ‘‰ GitHub Repo: https://github.com/azmatahmed11/docker-push-docker
🌐 Portfolio: https://azmatahmed.netlify.app/

πŸ”‘ Keywords
Docker, DevOps, Node.js app deployment, AWS EC2, Dockerfile, containerization, automation
Enter fullscreen mode Exit fullscreen mode

Top comments (0)