Skip to content

vivs-ty/cloud-native-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud Native Application v2.0.0

A modern cloud-native application built with FastAPI, featuring an interactive UI and comprehensive CI/CD pipeline.

Features

  • Modern web interface with Tailwind CSS
  • Task management system (create, list, delete tasks)
  • Real-time health monitoring
  • RESTful API endpoints
  • Automated CI/CD with GitHub Actions
  • Docker containerization
  • Comprehensive test suite
  • OpenAPI documentation

Quick Start

Running Locally

  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
python main.py

Running with Docker

  1. Build the Docker image:
docker build -t cloud-native-app .
  1. Run the container:
docker run -p 8000:8000 cloud-native-app

Screenshot 2025-03-23 195919

Screenshot 2025-03-23 195944

Screenshot 2025-03-23 195955

API Endpoints

  • /: Interactive web interface
  • /tasks: Task management endpoints (GET, POST, DELETE)
  • /health: Health check endpoint with real-time monitoring
  • /docs: OpenAPI documentation (Swagger UI)
  • /redoc: Alternative API documentation

Development

  • FastAPI with automatic reload enabled
  • Comprehensive test suite with pytest
  • GitHub Actions for automated testing and deployment
  • Container registry integration

CI/CD Pipeline

The application includes a complete CI/CD pipeline that:

  • Runs automated tests
  • Generates test coverage reports
  • Builds and pushes Docker images
  • Deploys to container registry
  • Ensures code quality

Zero-Manual Online Preview

This repository now includes an automated workflow that can run the app online with Docker and then fully clean up resources.

  • Workflow file: .github/workflows/ephemeral-online-preview.yml
  • Triggered automatically on pushes to main or master
  • Can also be started manually with a custom runtime duration
  • Builds image, starts container, opens a temporary public URL, then always stops and deletes container/image/tunnel

How to use:

  1. Push code to master or main, or run the workflow from the Actions tab.
  2. Open the workflow run summary and copy the preview URL.
  3. After the configured duration, cleanup runs automatically.

Important behavior:

  • The preview URL is temporary and only alive during the workflow run.
  • At the end of the run, all Docker runtime resources created by the job are removed.
  • GitHub-hosted runners are ephemeral, so no compute remains running after the job finishes.

About

A modern cloud-native application built with FastAPI, ready for containerization and deployment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors