diff --git a/compose.yml b/compose.yml index ad1bf19..8099829 100644 --- a/compose.yml +++ b/compose.yml @@ -18,6 +18,7 @@ services: environment: - ENVIRONMENT=dev - TESTING=0 + - ENABLE_DOCS=/docs - DATABASE_URL=postgres://postgres:postgres@web-db:5432/web_dev - DATABASE_TEST_URL=postgres://postgres:postgres@web-db:5432/web_test diff --git a/project/app/main.py b/project/app/main.py index 423beeb..0c497fa 100644 --- a/project/app/main.py +++ b/project/app/main.py @@ -1,4 +1,5 @@ import logging +import os from fastapi import FastAPI @@ -9,7 +10,12 @@ def create_app() -> FastAPI: - application = FastAPI(title="text-summarizer", lifespan=lifespan) + application = FastAPI( + title="text-summarizer", + lifespan=lifespan, + docs_url=os.getenv("ENABLE_DOCS", None), + redoc_url=None, + ) application.include_router(ping.router) application.include_router(summaries.router, prefix="/summaries", tags=["summaries"]) return application