A hands-on DevOps project built during an internship to practice real-world workflows — containerization, CI/CD pipelines, infrastructure automation, and security. The project is structured as a multi-tool DevOps stack and deployed using Docker + Nginx, with pipelines running on both GitHub Actions and GitLab CI.
| Docker Container Running | App Served at localhost:8080 |
|---|---|
devops-nginx image · port 8080→80 |
"Hello from DevOps Project 🚀" |
Nginx is serving a static page from inside a Docker container on WSL2 Ubuntu.
- Built a custom Docker image using
nginx:alpineas the base - Copied
app/index.htmlandnginx/default.confinto the image - Exposed port 80, mapped to host port 8080
- Debugged and fixed a 502 Bad Gateway error (nginx was proxying to a non-existent upstream on port 3000)
- Fixed a bash entrypoint syntax error (
unexpected token 'newline') - Successfully ran container:
docker run -d -p 8080:80 devops-nginx
-
Created
.gitlab-ci.ymlwith abuildstage andbuild-job -
First run failed:
docker: command not foundon GitLab shared runners
-
Fixed by removing Docker dependency from the pipeline job
-
Second run passed (Pipeline #2447320552, 30s) — verified project files, echoed build messages

-
Added
bash-check.ymlworkflow with atest-bashjob
-
Triggered on every
pushtomain -
Workflow passed on first run (9s total, 4s job time)
-
Repository:
rey26341-sudo / devops-stackon GitHub
-
Configured two remotes:
origin(GitLab) andgithub(GitHub) -
Push to both simultaneously:
git push && git push github main
devops-stack/
├── app/ # Static web app (index.html)
├── nginx/ # Nginx config (default.conf)
├── dockerfile # Docker image definition
├── ansible/ # Ansible playbooks (planned)
├── terraform/ # Terraform IaC scripts (planned)
├── jenkins/ # Jenkins pipeline config (planned)
├── scripts/ # Bash utility scripts
├── security/ # Security patch check scripts
├── screenshots/ # Proof-of-work screenshots
└── README.md
| Problem | Fix |
|---|---|
| Nginx 502 Bad Gateway | Removed broken upstream proxy config |
| GitLab CI docker not found | Removed Docker dependency from shared runner job |
| GitHub auth failure | Switched from password to Personal Access Token |
| Bash entrypoint syntax error | Fixed newline formatting in entrypoint script |
- Ansible playbook for server config automation
- Terraform for GCP VM provisioning
- Jenkins self-hosted pipeline
- Kubernetes deployment with Helm
| Tool | Purpose | Status |
|---|---|---|
| Docker | Containerization | ✅ Implemented |
| Nginx | Reverse proxy / static server | ✅ Implemented |
| GitHub Actions | CI pipeline | ✅ Implemented |
| GitLab CI | CI pipeline | ✅ Implemented |
| Bash | Scripting & automation | ✅ Implemented |
| Ansible | Server configuration automation | 🔧 In Progress |
| Terraform | Infrastructure as Code | 🔧 In Progress |
| Jenkins | CI/CD pipeline (self-hosted) | 🔧 In Progress |
| GCP | Cloud VM provisioning | 📋 Planned |
- Docker installed (or WSL2 + Docker Desktop on Windows)
- Git
# Clone the repo
git clone https://github.com/rey26341-sudo/devops-stack.git
cd devops-stack
# Build the Docker image
docker build -t devops-nginx .
# Run the container
docker run -d -p 8080:80 devops-nginx
# Open in browser
# → http://localhost:8080docker ps
# You should see devops-nginx mapped to 0.0.0.0:8080->80/tcpDeveloper pushes code to GitHub / GitLab
│
▼
┌─────────────────────────────────┐
│ GitHub Actions (bash-check) │ ← triggers on push to main
│ • Runs test-bash job (4s) │
│ • Status: ✅ PASSING │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ GitLab CI (.gitlab-ci.yml) │ ← triggers on push to main
│ • Runs build-job (30s) │
│ • Verifies project structure │
│ • Status: ✅ PASSING │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ Docker image built locally │ ← manual step (local WSL2)
│ • nginx:alpine base │
│ • Served at localhost:8080 │
└─────────────────────────────────┘
---
---
## 👤 Author
**Iswaryak / Rengu** — DevOps Intern
📍 Tiruchirappalli, Tamil Nadu
🔗 [GitLab](https://gitlab.com/rengu26341) · [GitHub](https://github.com/rey26341-sudo)
