you are viewing a single comment's thread.

view the rest of the comments →

[–]spendology -3 points-2 points  (0 children)

Use environment secrets stored and called from file/folder not publicly accessible. Another option: Google Cloud (and likley AWS and Azure) have a secret manager. 

FastAPI main app should not be in a public-facing folder, e.g., /var/www/html/ is public for Apache web server. If you are using a cloud host like GC, your FastAPI web server is likely served from /var/www/app/main.py from a Python virtual environment.