diff --git a/app/main.py b/app/main.py index 0640519..daa076e 100644 --- a/app/main.py +++ b/app/main.py @@ -1,11 +1,14 @@ +import os from fastapi import FastAPI -APP_NAME = "Python FastAPI Template" -APP_VERSION = "1.0.0" +APP_NAME = os.getenv("APP_NAME", "Python FastAPI Template") +APP_VERSION = os.getenv("APP_VERSION", "1.0.0") +ROOT_PATH = os.getenv("ROOT_PATH", "") app = FastAPI( title=APP_NAME, - version=APP_VERSION + version=APP_VERSION, + root_path=ROOT_PATH ) @app.get("/health") @@ -17,5 +20,6 @@ def version(): return { "app": APP_NAME, "version": APP_VERSION, - "language": "python" + "language": "python", + "root_path": ROOT_PATH }