From c51828cf11e4097c281861d5ec8a44f0f378dbd4 Mon Sep 17 00:00:00 2001 From: Icemap Date: Thu, 20 Jun 2024 20:37:23 +0800 Subject: [PATCH] fix: debug env error --- Makefile | 10 ---------- app/config/__init__.py | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index ab4e868..0000000 --- a/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -.PHONY: build start - -build: - docker build -t trans-forum:latest . - -start: - docker run -itd \ - -p 4000:4000 \ - -v .env:/app/.env \ - trans-forum:latest \ No newline at end of file diff --git a/app/config/__init__.py b/app/config/__init__.py index 445e1a9..d06cee0 100644 --- a/app/config/__init__.py +++ b/app/config/__init__.py @@ -20,7 +20,7 @@ class __Config: def __init__(self): load_dotenv() - self.debug = bool(os.getenv("DEBUG", "True")) + self.debug = bool(os.getenv("DEBUG", "True") == "True") self.open_ai_base_url = os.getenv("OPEN_AI_BASE_URL", "https://api.openai.com/v1") self.open_ai_api = os.getenv("OPEN_AI_API", "")