DEV Community

Cover image for 🚀 End-to-End Deployment of “The EpicBook!” Application with Terraform, AWS, and Nginx
Daniel Inyang
Daniel Inyang

Posted on

🚀 End-to-End Deployment of “The EpicBook!” Application with Terraform, AWS, and Nginx

Building and deploying real-world applications goes far beyond just writing code—it involves provisioning infrastructure, configuring services, and solving unexpected issues along the way. In this project, I implemented a complete end-to-end deployment of The EpicBook! application using Terraform, AWS EC2, and Nginx, while handling real-world challenges across the stack.

🧩 Project Overview

The goal was to deploy a full-stack application in a production-style environment, leveraging Infrastructure as Code (IaC) to ensure consistency, scalability, and repeatability.

This project covered:

Infrastructure provisioning
Backend and database setup
Reverse proxy configuration
End-to-end testing and troubleshooting

⚙️ 1. Infrastructure as Code with Terraform

I used Terraform to provision the core AWS infrastructure required to run the application. This included:

EC2 instance deployment
Networking configuration
Public IP allocation

By defining everything in code, I eliminated manual setup steps and ensured the environment could be recreated reliably at any time.

🧱 2. System Setup & Dependencies

Once the infrastructure was ready, the next step was preparing the server environment:

Installed Git for version control
Installed Node.js using NVM for flexibility
Installed npm for package management
Set up MySQL Server 5.7

Careful validation was done to ensure all services were installed correctly and running as expected.

📦 3. Application Deployment

With the system ready, I deployed the application:

Cloned The EpicBook! repository from GitHub
Installed dependencies using npm install
Started the Node.js backend server

This brought the application logic to life on the server.

🗄️ 4. Database Configuration

The database layer was configured to support the application:

Created a MySQL database
Executed schema and seed scripts
Updated the application’s database connection settings

This ensured proper communication between the backend and the database.

🌐 5. Reverse Proxy Setup with Nginx

To make the application accessible externally and production-ready:

Installed and configured Nginx
Set up a reverse proxy to route traffic to the Node.js app (port 8080)
Enabled access via the EC2 public IP

Nginx acted as the gateway, efficiently handling incoming requests and forwarding them to the application.

🧪 6. End-to-End Validation

After deployment, I performed full testing:

Accessed the application via a web browser
Verified frontend, backend, and database integration
Ensured all components communicated seamlessly

🛠️ 7. Troubleshooting in the Real World

This project wasn’t just about deploying—it was about solving real problems.

Some of the issues I encountered and resolved included:

MySQL temporary password and authentication errors
Node.js and npm installation challenges using NVM
Database connection failures (ECONNREFUSED, access denied)
Nginx errors such as 502 Bad Gateway and port conflicts
Permission and dependency-related issues

Each issue required investigation, debugging, and iterative fixes—exactly what happens in real production environments.

💡 Key Takeaways

Terraform enables consistent and repeatable infrastructure deployment
Nginx is essential for production-grade traffic routing and reverse proxying
Full-stack debugging is a critical DevOps skill
Real learning happens when systems break—and you fix them

🔥 Final Thoughts

From provisioning infrastructure to configuring services and resolving live issues, this project reflects what practical DevOps engineering truly looks like.

It reinforced the importance of:

Automation
System design
Troubleshooting under real conditions

And most importantly, it showed that growth comes from hands-on experience and persistence.

📌 Resources
GitHub Repository: https://lnkd.in/e_yBnf-8
Application URL: http://32.193.246.22
(terminated after validation)

Real progress in tech comes from building, breaking, and fixing.
On to the next challenge 🚀

Till next time, always stay positive 👍

🙌 Acknowledgment

Shout out to Pravin Mishra, Lead Co-Mentor: Praveen Pandey
🤝 Co-Mentors: Egwu Oko, Tanisha Borana, Ranbir Kaur

P.S. This post is part of the DevOps Micro Internship (DMI) Cohort-2 by Pravin Mishra. You can start your DevOps journey by joining this
Discord community ( https://lnkd.in/e4wTfknn ).

Top comments (0)