That's weird, I have never noticed any kind of .html files generation when accessing the docs and I have worked with F.Api for some time now, also can't seem to find ang mention of this generation in the docs (that it actually writes files).
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.
In your docker-compose.yml file, your healthcheck for fastapi uses wget, which saves the file to disk by default. Add --spider to make it behave correctly. Your nginx service has the correct command.