IAMUVIN

Blog

Blog

Technical writing on Web3, AI, and building things. Written by Uvin Vindula.

130 articles · 5 in DevOps & Deployment

DevOps & Deployment9 min
IAMUVIN

Environment Variables in Next.js: The Production Guide

A complete guide to managing environment variables in Next.js across local development, preview deploys, and production. Covers how Next.js resolves .env files, the NEXT_PUBLIC_ prefix rules that trip up every developer at least once, type-safe validation with Zod, build-time vs runtime variables, secrets management on Vercel, common mistakes that accidentally leak API keys to the browser, and the exact .env setup I use on every project. If you have ever shipped a deploy that silently broke because an env var was missing, this guide will save you from that particular brand of pain.

U
Uvin Vindula·December 8, 2025
DevOps & Deployment10 min
IAMUVIN

Monitoring Production Next.js Applications: My Setup

A practical walkthrough of how I monitor every production Next.js application I ship. Covers Vercel Analytics for traffic and engagement, Speed Insights for real-user Web Vitals, structured logging that actually helps when things break, error tracking with Sentry, API route monitoring, database performance with Prisma metrics, uptime checks, and the real cost of running this stack. No enterprise-scale overkill — just the monitoring setup that has saved me from 3am surprises across dozens of client projects.

U
Uvin Vindula·September 15, 2025
DevOps & Deployment10 min
IAMUVIN

Docker for Next.js: Multi-Stage Builds and Production Deployment

A hands-on guide to containerizing Next.js applications with Docker multi-stage builds, standalone output mode, and production-ready deployment. Covers when Docker makes sense over Vercel, how to get image sizes under 150MB, environment variable handling at build and runtime, Docker Compose for local development, health checks, layer caching strategies, and the common mistakes that waste hours. Includes my complete production Dockerfile and docker-compose.yml that I use for enterprise client deployments.

U
Uvin Vindula·April 21, 2025
DevOps & Deployment10 min
IAMUVIN

GitHub Actions for Next.js: My CI/CD Pipeline Setup

A hands-on walkthrough of the CI/CD pipeline I run on every Next.js project using GitHub Actions. Covers the full sequence — lint, type-check, test, build, deploy verification — with real workflow files from production repos. Includes caching strategies that cut pipeline time by 60%, environment variable handling for preview deploys, branch protection rules, and the complete workflow YAML I copy into every new project. If your Next.js code goes straight from push to Vercel without any checks, this guide is for you.

U
Uvin Vindula·January 20, 2025
DevOps & Deployment11 min
IAMUVIN

Deploying Next.js to Vercel: My Production Deployment Guide

A production-focused guide to deploying Next.js applications on Vercel, covering environment variable management, preview deployments, edge functions, analytics, CI/CD pipelines, performance monitoring, and cost optimization. Based on running four production sites — EuroParts Lanka, uvin.lk, FreshMart, and iamuvin.com — on a single Vercel account (uvindev). Includes real vercel.json configs, edge function patterns, and a deployment checklist I run before every production push.

U
Uvin Vindula·October 7, 2024