Skip to content

tremolidades/github-actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base Project - FastAPI

Goal

Deploy the image for Base API using FastAPI with openAPI Docs, basics testing and coverage in GitHub Container Registry

Workflows

main.yml

  • Start: Automatic (Push branch testing)
  • Detail: Executes tasks related to validation, unit tests, build, push docker image and generates the pre-release packaging for distribution.

Microservice Base Folders

Folders

[]

TO-DO

Prepare Environment dependencies

python -m venv my_env

# Windows
my_env/Scripts/activate.bat

# Unix
source my_env/bin/activate

python -m pip install -r requirements.txt

Run Locally

python -m uvicorn app.main:app --host 0.0.0.0 --port 80 --reload

# go to http://127.0.0.1:80/microservice/api/v1/docs in your browser

Build

docker build . -t <imagename>

Run

docker run -p <local_port>:80 <imagename>

Testing

Add some basics testing files on tests folder

Running test

python -m pytest

About

Example for FastAPI docker image deploy in GitHub Container Registry

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors 2

  •  
  •