Code Monkey home page Code Monkey logo

fastapi-docker-github-actions's Introduction

FASTAPI-DOCKER-GITHUB-ACTIONS

example workflow


Overview ๐Ÿ”ฎ

Welcome to the FastAPI-Docker-GitHub-Actions Lab! This repository serves as an educational example of a CI/CD project that demonstrates the usage of GitHub Actions for deploying a simple FastAPI server. Key components include:

Usage ๐Ÿ‘ป

The core idea is to have a CI/CD pipeline that illustrates the automation with Continuous Integration, however, you can follow these steps to configure/run the project locally:

Clone the repository

Begin by cloning this repository to your local machine:

git clone https://github.com/san99tiago/fastapi-docker-github-actions
cd fastapi-docker-github-actions

Configure Python Dependencies with Poetry

To manage Python dependencies and create a virtual environment, install Poetry following the instructions for your preferred installation method:

Once Poetry is installed, execute the following commands for its setup:

poetry shell
poetry install

Run the Server Locally with Uvicorn

To run the FastAPI server with Uvicorn, use the following command:

poe fastapi-local

Run the Server Locally with Docker-Compose

For an easy way to run the FastAPI server as a Docker container using Docker-Compose, use the following commands:

# Start the service
poe fastapi-docker-up

# Stop the service
poe fastapi-docker-down

Validate the Server

After running the server using the previous commands, open your preferred tool for making API requests and try the following REST-API endpoints:

Special thanks

A big thank you to all the dedicated contributors who have made the open-source projects used in this repository possible.

Author ๐ŸŽน

Santiago Garcia Arango

This repository's content is inspired by multiple online resources. Please feel free to use it as a guide for your future projects.!

As a Curious DevOps Engineer, I am deeply passionate about implementing cutting-edge cloud-based solutions on AWS.
I firmly believe that today's greatest challenges must be solved by the expertise of individuals who are truly passionate about their work.

LICENSE

Copyright 2023 Santiago Garcia Arango

fastapi-docker-github-actions's People

Contributors

san99tiago avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bycle

fastapi-docker-github-actions's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.