DEV Community

Cover image for Building a Production-Ready DevOps Pipeline: URL Shortener with Docker, GitHub Actions & AWS
Faizan Firdousi
Faizan Firdousi

Posted on

Building a Production-Ready DevOps Pipeline: URL Shortener with Docker, GitHub Actions & AWS

I’ve been exploring Docker and AWS fundamentals for a while, and I finally pushed myself to build a complete, production-style project from scratch—something that aligns with real-world DevOps workflows and cloud-native deployment practices.

url-shortener-image

This is a URL shortener service powered by a Go backend API, PostgreSQL as the database engine, Redis for caching, and a lightweight frontend. The structure loosely follows a microservices-oriented pattern to ensure clean separation of components, better scalability, and easier containerized deployment.

For Infrastructure & Deployment, I containerized all services using Docker with multi-stage builds and orchestrated the full stack using 𝗗𝗼𝗰𝗸𝗲𝗿 𝗖𝗼𝗺𝗽𝗼𝘀𝗲:

-Frontend
-PostgreSQL
-Redis
-Backend

I intentionally held off on Kubernetes for now—wanted to master container orchestration fundamentals with Docker Compose before moving into full K8s clusters and cloud orchestration tools. Docker Hub acts as the central container registry, streamlining image management across the CI/CD pipeline.

Next, I configured 𝗚𝗶𝘁𝗛𝘂𝗯 𝗔𝗰𝘁𝗶𝗼𝗻𝘀 𝗖𝗜/𝗖𝗗 to automate the build, test, and deployment workflow:

CI pipeline builds the Docker image on every push to main and publishes it to Docker Hub for consistent environment packaging.

CD pipeline runs on a self-hosted GitHub Actions runner inside an AWS EC2 instance, automatically pulling updated images and redeploying the full stack using Docker Compose.

CI-pipeline

CD-pipeline

This setup offers smoother, near zero-downtime deployments with proper container health checks and reliable infrastructure automation. It also mirrors how modern engineering teams manage continuous delivery in cloud environments.

The process came with plenty of challenges—pipeline errors, YAML workflow fixes, and debugging different container services. But the grounding I’ve built in Linux, AWS, networking, Docker, and basic system design helped me move past most hurdles.

I’m looking forward to building more cloud-based projects, exploring scalable backend systems, and strengthening my DevOps engineering skills.

GitHub repo: https://github.com/faizanfirdousi/url_shortener

Top comments (0)