Skip to content

[DevOps Series] Part 2: A Noob Guy Deploys His Web App

Lilhuy

📚 Series Table of Contents

  1. 📖 Chapter 0: Introduction and Stories
  2. 📚 Chapter 1: Some concepts and terminologies
  3. 🚀 Chapter 2: A noob guy deploys his web app (You are here) 🎯
  4. 🐳 Chapter 3: Docker and the world of containerization 📦
  5. ☸️ Chapter 4: K8s in a nutshell ⚙️
  6. 🔧 Chapter 5: K8s in details 🛠️
  7. 🏠 Chapter 6: Before going to the ground 🏡
  8. 🐧 Chapter 7: Ubuntu server and the world of Linux 🖥️
  9. Chapter 8: MicroK8s the simple and powerful K8s ⚙️
  10. ☁️ Chapter 9: Harvester HCI the native cloud 🌐
  11. 🏭 Chapter 10: More about Harvester HCI 🏢
  12. 🖥️ Chapter 11: Proxmox VE the best VM manager 💾
  13. 🌐 Chapter 12: Turn a server into a router with PfSense 🔌
  14. 🛠️ Chapter 13: Some tools, services that you can install for your DevOps pipeline 🔧
  15. 🌍 Chapter 14: Hello Internet with Cloudflare Zero Trust 🔒
  16. 🎉 Chapter 15: Maybe it’s the end of the series 🏁

With some AWS credits, here’s how I used to deploy my web app to production using AWS Lightsail.

1. Create a New AWS Lightsail Instance

2. Connect to the Instance via SSH

3. Some Basic Linux Commands

No more double-click, right-click, open file explorer, open terminal, open browser, open everything. Just you and the keyboard working on a white-on-black terminal. Feel like a hacker! 😄

4. Configure SSH via Password

5. Install Environments

# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

# In lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"

# Download and install Node.js:
nvm install 22

# Verify the Node.js version:
node -v # Should print "v22.18.0"
nvm current # Should print "v22.18.0"

# Verify npm version:
npm -v # Should print "10.9.3"bash

6. Run Your App in Background

7. Domain and SSL Certificate

8. Nginx as a Reverse Proxy

server {
    listen 80;
    server_name your-domain;
    location / {
        proxy_pass http://localhost:3000; # your service port
    }
}example.com

Ok, that’s it for this long chapter. That’s how I deployed a lot of backend services before for my company when my boss had a lot of AWS credits! 😄 Again, all these things are not hard or best practices, but maybe the easiest way for a noob guy like me. And as I said, now you can do these things with one prompt like: “I have an AWS Lightsail instance, I want to deploy my web app to it” and ChatGPT will help you do it! 😄

Thanks for reading. See you in the next chapter!


📚 Series Navigation

Previous ChapterSeries InfoNext Chapter
← Previous Chapter
📚 Some concepts and terminologies
DevOps Series
Chapter 2 of 16
Next Chapter →
🐳 Docker and the world of containerization
Edit this post
Previous
[DevOps Series] Part 3: Docker and the world of containerization
Next
[DevOps Series] Part 1: Some concepts and terminologies