this post was submitted on 07 Feb 2024
8 points (100.0% liked)

Python

5396 readers
1 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

๐Ÿ“… Events

October 2023

November 2023

PastJuly 2023

August 2023

September 2023

๐Ÿ Python project:
๐Ÿ’“ Python Community:
โœจ Python Ecosystem:
๐ŸŒŒ Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
 

I deploy a FastAPI service with docker (see my docker-compose.yml and app).

My service directory gets filled with files index.html, index.html.1, index.html.2,... that all contain

They seem to be generated any time the docker healthcheck pings the service.

How can I get rid of these?

PS: I had to put a screenshot, because Lemmy stripped my HTML in the code quote.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 4 points 7 months ago (6 children)

This is a FastAPI feature - Autogenerated documentation using Swagger.

You can turn it off by setting docs_url=None

In your linked main.py:

app = FastAPI(
    title="IslabTweet",
    description=__doc__,
    docs_url="/", # change this to None to disable the docs
    version=VERSION,
)

Hope this helps!

[โ€“] [email protected] 1 points 7 months ago

Well, I do need OpenAPI (Swagger). What I don't need is the generation of thousands of equal static files. Out of all these generated files, index.html would've been enough and I don't need index.html.1, etc.

load more comments (5 replies)