Post

Building My Portfolio: From Zero to Deployed

Building My Portfolio: From Zero to Deployed

I built and deployed my portfolio site after reading Logan Marchione’s post about DevOps projects for beginners.

The project covers infrastructure provisioning, server configuration, web server setup, DNS management, and deployment.

The Starting Point

I had a Jekyll app in a repository that needed to be deployed.

Infrastructure as Code

First step: Terraform script to provision infrastructure on Google Cloud Platform.

1
2
3
4
5
6
7
8
# The usual suspects - VPC, firewall rules, compute instance
resource "google_compute_instance" "portfolio_vm" {
  name         = "portfolio-server"
  machine_type = "e2-micro"  # Free tier FTW
  zone         = "us-central1-a"
  
  # ... networking, disks, etc
}

Configuration:

  • Ingress and Egress rules: Opened HTTP (80) and HTTPS (443) ports
  • SSH access: Port 22 for remote management
  • Instance type: e2-micro (free tier)

Server Setup

Server setup steps:

1
2
3
4
5
6
7
8
9
10
# Always start here
sudo apt update && sudo apt upgrade -y

# Essential tools
sudo apt install -y git nginx certbot python3-certbot-nginx

# Ruby environment for Jekyll
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
rbenv install 3.1.0
rbenv global 3.1.0

The Build Process

Cloned the Jekyll repo, installed dependencies, and built the site:

1
2
3
4
git clone https://github.com/username/portfolio.git
cd portfolio
bundle install
jekyll build

Configured nginx to serve the _site directory:

1
2
3
4
5
6
server {
    listen 80;
    server_name your-domain.com;
    root /path/to/portfolio/_site;
    index index.html;
}

Domain Setup

Purchased a domain at Namecheap for ₹300 and configured DNS with an A record pointing to the GCP VM’s external IP.

1
2
3
4
Type: A
Host: @
Value: 34.123.456.789  # Your VM's IP
TTL: Automatic

The Moment of Truth

Typed the domain into my browser. It worked. Yayy!

SSL Certificate

With certbot installed, getting an SSL certificate was straightforward:

1
sudo certbot --nginx -d your-domain.com

Certbot automatically updated the nginx configuration and set up auto-renewal. HTTPS enabled ✅

Next Steps

Now I have a foundation to build on:

  • Automated deploymentsDone
  • Ansible playbooks for server configuration management
  • Monitoring and logging
  • Maybe a CDN if I’m feeling fancy

Summary

This project covers the full deployment stack:

  • Infrastructure provisioning with Terraform
  • Server administration and configuration
  • Web server setup with nginx
  • SSL certificate management
  • DNS configuration
  • Application deployment
This post is licensed under CC BY 4.0 by the author.