Skip to content

javeriadevops/DevOps-Todo-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevOps To-Do API

A simple Flask-based To-Do REST API, fully containerized with Docker and integrated with a GitHub Actions CI/CD pipeline that automatically tests, builds, and publishes the Docker image to Docker Hub on every push to main.

Tech Stack

  • Backend: Python (Flask)
  • Testing: Pytest
  • Containerization: Docker
  • CI/CD: GitHub Actions
  • Registry: Docker Hub

Features

  • REST API for managing To-Do items (Create, Read, Update, Delete)
  • Health check endpoint for monitoring
  • Automated test suite run on every push/PR
  • Automated Docker image build & push on every merge to main

API Endpoints

Method Endpoint Description
GET /health Health check
GET /todos Get all todos
POST /todos Create a new todo
PUT /todos/<id> Update an existing todo
DELETE /todos/<id> Delete a todo

Running Locally

pip install -r requirements.txt
python app.py

API will be available at http://localhost:5000

Running with Docker

docker build -t devops-todo-api .
docker run -p 5000:5000 devops-todo-api

Running Tests

pip install pytest
pytest test_app.py -v

Project Structure

devops-todo-api/
├── app.py
├── test_app.py
├── requirements.txt
├── Dockerfile
├── .dockerignore
└── .github/
    └── workflows/
        └── ci-cd.yml

-by javeriadevops

About

A Flask-based To-Do REST API with Docker containerization and automated CI/CD pipeline using GitHub Actions

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages