/FastAPI-MongoDB-Docker

Primary LanguageHTMLApache License 2.0Apache-2.0

YourDrive (Cloud Storage)

Local Run

To run it locally, first we need to set some environments.

export CLIENT_ID = <client-id from the Google Identity Platform> 
export CLIENT_SECRET = <client-secret from the Google Identity Platform>
export DOMAIN = http://localhost:8000
export USERNAME = <mongodb username>
export PASS = <mongodb password>

This project is using poetry for dependency management.

Install the dependencies:

poetry install
poetry shell

Then run the uvicorn server:

cd app
uvicorn main:app

Then run the uvicorn server:

cd app
uvicorn main:app

Remote deployment

Apply the enviroments in the project settings.

CLIENT_ID = <client-id from the Google Identity Platform> 
CLIENT_SECRET = <client-secret from the Google Identity Platform>
DOMAIN: <domain(url) given by the Cloud provider> 
USERNAME = <mongodb username>
PASS: <mongodb pass>

Deploy the app.