feat(setup): add setup.sh script for automated environment provisioning and app launch
Build and Push to Registry / build (push) Successful in 7s

This commit is contained in:
2026-04-13 01:26:20 +02:00 Unverified
parent f9e33e2847
commit aad4cf6af1
4 changed files with 120 additions and 6 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)