Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akmamun/fastapi-mongo
Fast API Microservice for API development
https://github.com/akmamun/fastapi-mongo
boilerplate-template docker docker-compose fastapi microservice mongodb python
Last synced: about 1 month ago
JSON representation
Fast API Microservice for API development
- Host: GitHub
- URL: https://github.com/akmamun/fastapi-mongo
- Owner: akmamun
- Created: 2021-02-10T12:05:26.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-06T07:08:48.000Z (12 months ago)
- Last Synced: 2024-10-17T02:00:53.844Z (3 months ago)
- Topics: boilerplate-template, docker, docker-compose, fastapi, microservice, mongodb, python
- Language: Python
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## FastAPI Micro Service with Docker, Nginx, and Asynchronous MongoDB (Motor)
### Installation Instructions
- Create a [virtual environment](https://docs.python.org/3/library/venv.html)
- Install the Python dependencies with
```sh
pip install -r requirements.txt
```
- Copy the .env.example file as .env
```sh
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:
```sh
uvicorn server:app --reload
```### Run with Docker
- To run the service using Docker, use the following command:
```sh
sudo docker-compose up -d --build
```
### Run Docker Compose for Production Build
- Ensure that you have [Docker](https://docs.docker.com/engine/install) and [Docker Compose](https://docs.docker.com/compose/install/) installed