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.

  • unalivejoy@lemm.ee
    link
    fedilink
    English
    arrow-up
    5
    ·
    10 months ago

    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.