akmamun / fastapi-mongo

Fast API Microservice for API development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FastAPI Micro Service with Docker, Nginx, and Asynchronous MongoDB (Motor)

Installation Instructions

  • Create a virtual environment
  • Install the Python dependencies with
    pip install -r requirements.txt
  • Copy the .env.example file as .env
    cp .env.example .env
  • Ensure that you fill in all the valid environment properties in the .env file.

Run Locally

  • To run the service locally, use the following command:
    uvicorn server:app --reload

Run with Docker

  • To run the service using Docker, use the following command:
      sudo docker-compose up -d --build

Run Docker Compose for Production Build

About

Fast API Microservice for API development


Languages

Language:Python 91.8%Language:Dockerfile 8.2%