Posts

Showing posts from May, 2025

Deploying n8n on Google Cloud with Docker Compose

 πŸš€ Deploying n8n on Google Cloud with Docker Compose I recently published a hands-on guide on how I deployed a self-hosted instance of n8n using: 🐳 Docker Compose ☁️ Google Cloud Free Tier (f1-micro) πŸ” Domain + SSL with Cloudflare & NGINX It's a complete walkthrough with: Reusable docker-compose.yml Firewall, DNS, and SSL config Shell script to automate deployment πŸ”§ Ideal for solo builders, automation fans, or anyone wanting to host n8n privately without paying for n8n.cloud. πŸ“– Read the guide here: https://dev.to/surendergupta/how-i-deployed-a-self-hosted-n8n-instance-on-google-cloud-free-tier-with-docker-compose-script-lo0 πŸ› ️ Feedback welcome! Let me know how you'd optimize or scale it further with Docker Swarm, Watchtower, or Traefik. #Docker #DevOps #n8n #SelfHosted #OpenSource #Automation #GoogleCloud #DockerCompose #FreeTier #Cloudflare

🚨 Terraform Directory Structure – The Right Way! 🚨

 A well-structured Terraform directory ensures scalability , reusability , and efficient infrastructure management . Let’s dive into the best practices! πŸ‘‡ 1️⃣ Environments – Separate Configs for Dev, Stage & Prod Managing multiple environments? Structure them like this: πŸ“‚ Dev/ πŸ“‚ Stage/ πŸ“‚ Prod/ Each environment contains: ✅ main.tf – Defines cloud resources ✅ variables.tf – Declares variables (no values) ✅ outputs.tf – Stores outputs for dependencies 🚫 Instead of individual terraform.tfvars in each folder... Use a central .tfvars folder like: πŸ“‚ Env/ ✅ dev.tfvars – Development values ✅ stage.tfvars – Staging values ✅ prod.tfvars – Production values ⚡ Why? ✔️ Isolates environments safely ✔️ Avoids accidental changes in Prod ✔️ Modular and reusable configuration ⚡ Modules – Reusable Infrastructure Components Stop repeating yourself – use modules! πŸ“Œ VPC Module – Creates your Virtual Private Cloud πŸ“Œ EC2 Module – Manages EC2 instances ⚡ Why? ...

Daily DevOps Tip #1: Use Git Hooks to Automate Your Workflow

Want to catch errors before they hit your repo? Automate code checks? Git hooks can do that. Let’s look at how they can boost your DevOps workflow. πŸ” What Are Git Hooks? Git hooks are scripts that run automatically when certain Git events occur, like: pre-commit – Runs before a commit is finalized pre-push – Runs before pushing code post-merge – Runs after a merge happens πŸ› ️ Use Case: Pre-commit Hook Want to run ESLint before committing JavaScript code? Create a .git/hooks/pre-commit file: ``` #!/bin/sh npm run lint ``` Make it executable: ``` chmod +x .git/hooks/pre-commit ``` ✅ Benefits of Git Hooks Prevent bad code from entering the repo Enforce coding standards Automate routine tasks 🧠 Final Thoughts Git hooks are simple yet powerful. Start with a pre-commit or pre-push hook, and make automation a habit.

What is a CI/CD Pipeline? A Simple Explanation

CI/CD is at the heart of modern DevOps. But what exactly is a CI/CD pipeline, and how does it work? Let’s break it down in simple terms. πŸ› ️ What is CI/CD? CI (Continuous Integration) : Automatically test and merge code into a shared repository. CD (Continuous Delivery/Deployment) : Automatically release that tested code to production or staging. πŸ” CI/CD Pipeline Stages: Code Commit – Developers push code to Git Build – Code is compiled and packaged Test – Automated tests run (unit, integration, etc.) Deploy – Code is released to an environment (e.g., staging or production) Monitor – Track performance, errors, and alerts πŸ” Why It Matters Faster feedback loops Fewer bugs in production Safer, repeatable deployments 🧠 Final Thoughts CI/CD helps you move fast without breaking things . It’s the backbone of modern software delivery.

Top DevOps Tools You Should Know in 2025

Categories and Tools: πŸ§ͺ CI/CD Tools GitHub Actions – Native CI/CD in your GitHub repo Jenkins – Highly customizable open-source CI/CD server CircleCI – Cloud-native, fast, and scalable πŸ“¦ Containerization & Orchestration Docker – Package your apps into containers Kubernetes – Automate deployment, scaling, and management πŸ‘️ Monitoring & Observability Prometheus – Open-source monitoring for metrics Grafana – Dashboards and alerting ELK Stack – Centralized logging with Elasticsearch, Logstash, and Kibana πŸ” Security & DevSecOps Aqua Security – Container security Snyk – Scan for vulnerabilities in dependencies Trivy  – Scan for vulnerabilities in dependencies ⚡ Honorable Mentions: Terraform (Infrastructure as Code) ArgoCD (GitOps) Ansible (Configuration Management) 🧠 Final Thoughts The right tools can drastically improve your DevOps pipeline. Start small, choose tools that fit your stack, and scale...

What is DevOps? A Beginner-Friendly Guide

What is DevOps? DevOps is more than just a buzzword—it's a cultural shift that bridges the gap between development and operations teams to build, test, and release software faster and more reliably. In this post, we’ll explore what DevOps means, its core principles, and why it matters in today’s software delivery landscape. What is DevOps? DevOps is a combination of Development (Dev) and Operations (Ops) . It aims to: Improve collaboration between teams Automate infrastructure and deployments Deliver code faster with fewer errors Key DevOps Principles: Automation : From testing to deployment. Continuous Integration/Continuous Delivery (CI/CD) : Ship code frequently. Monitoring : Detect and resolve issues proactively. Collaboration : Break silos between Dev and Ops teams. Benefits of DevOps: Faster software delivery Higher-quality releases Better team collaboration Scalable and stable systems 🧠 Final Thoughts DevOps isn’t a tool—it’s a m...

Spinning Up Containers with Terraform + Docker!

Just provisioned an NGINX container using Terraform with the Docker provider πŸ’»πŸ³ Infrastructure as Code (IaC) makes container management super efficient, consistent, and scalable. With just a few lines of code, I: Pulled the official NGINX image Created a container named "tutorial" Exposed it on port 8000 All automated through Terraform! Here’s a sneak peek from the main.tf file: resource "docker_image" "nginx" {   name         = "nginx"   keep_locally = false } resource "docker_container" "nginx" {   image = docker_image.nginx.image_id   name  = "tutorial"   ports {     internal = 80     external = 8000   } } This is just the beginning—planning to scale this with multi-container setups, networks, and persistent storage. πŸ”§ Tech used: Terraform, Docker, NGINX πŸ’‘ Conclusion: This setup is a simple yet powerful example of how IaC can streamline containerized development. Whether for testing, staging, or produ...