Banhawy / python-microservice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python microservice test with Github Actions

Python Microservice

This is a sample python microservice project using GitHub Actions to be deployed in a containerized environment.

Local Development

To start a local server run the following command:

uvicorn main:app --reload

Container Development

To run the app inside a Docker container, first build the Docker image with the following command:

make build

Then run the Docker container with the following command:

make run

You could then access your application at the following url: http://127.0.0.1:8080/

Testing

Unit tests are included in the test_logic.py file

To run tests run the following command:

make test

About


Languages

Language:Python 81.8%Language:Makefile 13.2%Language:Dockerfile 5.0%