π Deploying EpicBook on Microsoft Azure β My Full-Stack Cloud Journey
π Introduction
As part of my continuous journey in cloud computing and DevOps, I recently deployed a full-stack web application β *EpicBook* β on Microsoft Azure.
Having previously built and deployed applications on AWS, I wanted to explore Azureβs infrastructure, networking, and database services to strengthen my multi-cloud expertise
ποΈ Project Overview
EpicBook is a full-stack web application built with:
- Frontend: React
- Backend: Node.js & Express
- Database: MySQL
- Web Server: Nginx
- Cloud Platform: Microsoft Azure
The goal was to host the frontend and backend on an Azure Virtual Machine, connect securely to an Azure Database for MySQL, and configure proper networking using Virtual Networks and Network Security Groups (NSGs).
βοΈ Step 1 β Setting Up the Infrastructure
I began by provisioning the foundational Azure resources:
- Created a Resource Group to organize all resources for the project.
- Configured a Virtual Network (VNet) with two subnets β one for the VM and one for the database.
- Set up Network Security Groups (NSGs) to control inbound and outbound traffic, ensuring only necessary ports (e.g., SSH, HTTP, HTTPS) were open.
- Provisioned an Ubuntu 22.04 LTS Virtual Machine as the compute resource for the application.
This setup provided a secure, isolated environment for both the application and database.
π§© Step 2 β Installing the Application Stack
After SSHing into the VM, I installed and configured the required tools:
sudo apt update -y
sudo apt install nginx -y
sudo apt install nodejs npm -y
sudo apt install mysql-client -y
bash
Then, I cloned the EpicBook repository from GitHub and installed all backend dependencies
git clone <your-repo-url>
cd theepicbook
npm install
bash
πΎ Step 3 β Configuring the Database Connection
I provisioned Azure Database for MySQL β Flexible Server and configured private VNet access for security.
Then, I updated the config/config.json file in the project to include the database credentials:
"development": {
"username": "your_username",
"password": "your_password",
"database": "epicbook",
"host": "epicbook-db.mysql.database.azure.com",
"dialect": "mysql",
"dialectOptions": {
"ssl": { "rejectUnauthorized": true }
}
}
bash
After configuration, I started the backend server and verified the database connection using:
node server.js
bash
Step 4 β Configuring Nginx as a Reverse Proxy
To serve the React frontend and route traffic to the Node.js backend, I configured Nginx as a reverse proxy:
sudo nano /etc/nginx/sites-available/epicbook
server {
listen 80;
server_name _;
location / {
root /var/www/epicbook-frontend/build;
index index.html;
try_files $uri /index.html;
}
location /api/ {
proxy_pass http://localhost:8080/;
}
}
bash
sudo ln -s /etc/nginx/sites-available/epicbook /etc/nginx/sites-enabled/
sudo systemctl restart nginx
bash
β
Step 5 β Testing the Deployment
Once everything was configured, I accessed the public IP of the VM in a browser and verified that:
The React frontend loaded successfully.
The backend APIs responded correctly.
The database stored and retrieved data securely via SSL.
The application was now live and fully functional β hosted entirely on Microsoft Azure.
π‘ Key Learnings
This project deepened my understanding of:
Azure networking concepts (VNet, NSG, subnets)
Secure database connectivity via private endpoints
Nginx reverse proxy configuration for full-stack apps
VM provisioning and Linux-based server management
Multi-cloud architecture principles (Azure + AWS)
π§ Conclusion
Deploying EpicBook on Azure was an exciting hands-on experience that combined my cloud, DevOps, and full-stack skills.
It reinforced how vital it is to understand not only the application logic but also the infrastructure and networking layers that make scalable cloud deployments possible.
Top comments (0)