Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

🚀 GitLab CI/CD Docker Deployment

📖 Overview

This project demonstrates the implementation of a Continuous Integration and Continuous Deployment (CI/CD) pipeline using GitLab. The application is containerized using Docker, and GitLab CI/CD automates the build process whenever code is pushed to the repository.

The project showcases essential DevOps practices including version control, containerization, pipeline automation, and deployment workflows.


🎯 Project Objectives

  • Set up a project on GitLab
  • Create a CI/CD pipeline using GitLab CI/CD
  • Containerize a web application using Docker
  • Automate the build process
  • Monitor pipeline execution and troubleshoot issues
  • Understand CI/CD concepts and DevOps workflows

🛠️ Technologies Used

  • GitLab
  • GitLab CI/CD
  • Docker
  • Nginx
  • HTML5

📂 Project Structure

GitLab-CI-CD-Docker-Deployment/
│
├── index.html
├── Dockerfile
├── .gitlab-ci.yml
└── README.md

Website URL

https://gitlab-cicd-demo.onrender.com/

🐳 Docker Configuration

FROM nginx:alpine

COPY index.html /usr/share/nginx/html/index.html

EXPOSE 80

⚙️ GitLab CI/CD Pipeline

stages:
  - build

docker_build:
  stage: build

  image: docker:24

  services:
    - docker:24-dind

  variables:
    DOCKER_TLS_CERTDIR: "/certs"

  script:
    - docker version
    - docker build -t gitlab-cicd-demo .

  only:
    - main

🔄 Workflow

Developer Pushes Code
          ↓
GitLab Repository
          ↓
GitLab CI/CD Pipeline Triggered
          ↓
Docker Image Build
          ↓
Pipeline Execution
          ↓
Build Status Generated
          ↓
Deployment Ready

📊 Pipeline Monitoring

Pipeline execution can be monitored through:

Build → Pipelines

GitLab provides:

  • Build Status
  • Job Logs
  • Execution Duration
  • Success/Failure Reports

✅ Results

  • Successfully created a GitLab project
  • Successfully containerized the application using Docker
  • Successfully configured a GitLab CI/CD pipeline
  • Successfully automated Docker image builds
  • Successfully monitored pipeline execution
  • Pipeline executed successfully

📚 Learning Outcomes

Through this project, I gained hands-on experience in:

  • GitLab Repository Management
  • Continuous Integration (CI)
  • Continuous Deployment (CD)
  • Docker Containerization
  • Pipeline Automation
  • Build Monitoring and Troubleshooting
  • DevOps Best Practices

👨‍💻 Author

Priyanshu Rohilla

GitHub: https://github.com/Webfire20

GitLab: https://gitlab.com/Priyanshu3010


⭐ Acknowledgement

This project was completed as part of a DevOps Internship task to gain hands-on experience with CI/CD pipelines, Docker, and GitLab automation.

About

A DevOps project demonstrating GitLab CI/CD pipeline automation, Docker containerization, automated builds, and deployment workflows using GitLab and Docker.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages