feat(setup): add setup.sh script for automated environment provisioning and app launch

This commit is contained in:
2026-04-13 01:41:35 +02:00 Unverified
parent f9e33e2847
commit 0be8e59ca2
6 changed files with 138 additions and 68 deletions
+7
View File
@@ -1,3 +1,4 @@
import os
import sys
from contextlib import asynccontextmanager
from pathlib import Path
@@ -43,9 +44,15 @@ async def lifespan(_: FastAPI):
await close_redis()
await close_mongodb()
DEBUG = os.getenv("DEBUG", "false").lower() == "true"
app = FastAPI(
title="thePlugAPI",
lifespan=lifespan,
docs_url="/docs" if DEBUG else None,
redoc_url="/redoc" if DEBUG else None,
openapi_url="/openapi.json" if DEBUG else None,
)
app.include_router(auth_router)