Skip to content

Commit c848121

Browse files
committed
feat: load settings from env file given by env var
1 parent 87e5c11 commit c848121

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vigobusbot/settings_handler/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Load settings from dotenv file or environment variables
33
"""
44

5+
import os
56
from typing import Optional
67

78
import pydantic
@@ -14,7 +15,7 @@
1415

1516
class BaseBotSettings(pydantic.BaseSettings):
1617
class Config:
17-
env_file = ".env"
18+
env_file = os.getenv("ENV_FILE", ".env")
1819

1920

2021
class TelegramSettings(BaseBotSettings):

0 commit comments

Comments
 (0)