Skip to content

nived2/simplcicd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advanced DevOps Project

CI/CD Pipeline

A production-ready DevOps project using Docker, Flask, and GitHub Actions.

Features

  • Flask web application with health checks
  • Multi-stage Docker builds for optimization
  • Continuous Integration/Continuous Deployment with GitHub Actions
  • Unit testing with pytest
  • Environment configuration management
  • Docker health checks
  • Production-ready with Gunicorn

Prerequisites

  • Docker
  • Docker Compose
  • Python 3.9+
  • Git

Development

  1. Clone the repository:
git clone <your-repo-url>
cd <repo-name>
  1. Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate  # On Windows: .\venv\Scripts\activate
pip install -r requirements.txt
  1. Run tests:
python -m pytest tests/
  1. Run the application locally:
python app.py

Docker Development

  1. Build and start the container:
docker-compose up --build
  1. Access the application:

CI/CD Pipeline

The project includes a GitHub Actions workflow that:

  1. Runs unit tests
  2. Builds the Docker image
  3. Tests the Docker container
  4. (Optional) Deploys to Docker Hub or your preferred cloud provider

Production Deployment

For production deployment:

  1. Set appropriate environment variables
  2. Use the multi-stage Docker build
  3. Enable health checks
  4. Configure your cloud provider's deployment settings

Monitoring

  • Health check endpoint: /health
  • Docker health check is configured in the Dockerfile
  • Container logs available via docker-compose logs

Stopping the Application

docker-compose down

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published