tssbot-api: load dotenv before uvicorn to pick up STORAGE_VOL_PATH
This commit is contained in:
+7
-1
@@ -1,8 +1,14 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
import uvicorn
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
_HERE = Path(__file__).resolve().parent.parent
|
||||||
|
load_dotenv(_HERE / ".env")
|
||||||
|
|
||||||
|
import uvicorn # noqa: E402
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
uvicorn.run(
|
uvicorn.run(
|
||||||
|
|||||||
Reference in New Issue
Block a user