Skip to content

fjemi/python-docker-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy APIs With Python and Docker

Table of Contents

Introduction

A production-ready API developed using Python and FastAPI. The API runs on an Uvicorn, an ASGI server, and is deployed using Docker.

Technologies

This project is created with

Deployment

Install the repo locally

$ git clone https://github.com/fjemi/python-docker-api.git python-docker-api
$ cd python-docker-api

Docker Compose

Run docker-compose up from the project's root directory to deploy the application

Docker

To build the app in a Docker image and run the image in a container, execute the following commands from the project's root directory

$ cd python-docker-api/api
# build the image
$ docker build -t app-image .
# run image in a container
$ docker run -d --name app-container -p 80:80 app-image

Usage

API Routing

  • Routes are defined in api/app/routes and are dynamically loaded
  • Routes and function loaded within from a route's .py file must share the same name

About

A production-ready API developed using Python and FastAPI. The API runs on an Uvicorn, an ASGI server, and is deployed using Docker.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published