A production-grade playbook for DevOps. Master Docker containerization, Kubernetes clusters, Terraform IaC, GitHub Actions, Linux administration, and Nginx configurations.
Docker wraps applications in container packages. To secure deployments, we write optimized multi-stage build files:
# Stage 1: Build react assets
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Stage 2: Minimal runtime footprint
FROM nginx:alpine
COPY --from=builder /app/out /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Kubernetes coordinates container clusters:
kube-apiserver, etcd, kube-scheduler).kubelet agent.# Simple Kubernetes Deployment Manifest
apiVersion: apps/v1
kind: Deployment
metadata:
name: ajitdev-api-deploy
spec:
replicas: 3
selector:
matchLabels:
app: api-server
template:
metadata:
labels:
app: api-server
spec:
containers:
- name: api
image: ajitdev/api-server:latest
ports:
- containerPort: 8080
Terraform automates cloud setup using HashiCorp Configuration Language (HCL).
# AWS VPC Creation with Terraform
resource "aws_vpc" "prod_vpc" {
cidr_block = "10.0.0.0/16"
enable_dns_hostnames = true
tags = {
Name = "prod-vpc"
Env = "production"
}
}
Automate builds, unit tests, and deployments directly from repository commits.
name: Production Deployment Pipeline
on:
push:
branches: [ main ]
jobs:
test-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install and Test
run: |
npm ci
npm run test
- name: Deploy to Cloud
run: echo "Triggering deployment action..."
Operating system operations: permissions, shell scripts, firewalls (ufw), and services management (systemd).
server {
listen 80;
server_name ajitdev.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
terraform.tfstate) maps configuration resources to real-world infrastructure. It is secured by using remote backends (like AWS S3) with encryption and state locking enabled.CTO @ Brainzima Innovation Institute 🚀 · Full Stack Developer & DevOps Engineer
Ajit Dev (also known as Ajit Kumar) is based in Katihar, Bihar, India. Specializing in MERN Stack, Next.js, Cloud Security, and Distributed Systems.