Skip to content

Commit cf277a0

Browse files
chore: add vercel app env
1 parent 82fb4d9 commit cf277a0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Settings(BaseSettings):
2929
{"hour": 0, "minute": 0, "id": "catalog_refresh_midnight"},
3030
)
3131
CATALOG_REFRESH_INTERVAL_SECONDS: int = 6 * 60 * 60 # 6 hours (used when CATALOG_UPDATE_MODE="interval")
32-
APP_ENV: Literal["development", "production"] = "development"
32+
APP_ENV: Literal["development", "production", "vercel"] = "development"
3333
HOST_NAME: str = "https://1ccea4301587-watchly.baby-beamup.club"
3434

3535
RECOMMENDATION_SOURCE_ITEMS_LIMIT: int = 10

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from app.core.app import app # noqa: F401
66
from app.core.config import settings
77

8-
if __name__ == "__main__":
8+
if __name__ == "__main__" and settings.APP_ENV != "vercel":
99
PORT = os.getenv("PORT", settings.PORT)
1010
reload = settings.APP_ENV == "development"
1111
uvicorn.run("app.core.app:app", host="0.0.0.0", port=int(PORT), reload=reload)

0 commit comments

Comments
 (0)