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

Python

6331 readers
120 users here now

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

πŸ“… Events

PastNovember 2023

October 2023

July 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
[–] mapto@lemmy.world 2 points 9 months ago* (last edited 9 months ago) (1 children)

Ok, that was stupid. Doing healthcheck with wget, does what wget does: it downloads the result. I had to add --spider to stop doing that

  wget -nv --spider http://localhost:8000 || exit 1
[–] taaz@biglemmowski.win 1 points 9 months ago* (last edited 9 months ago) (1 children)

usually I would use just curl for hc

[–] mapto@lemmy.world 1 points 9 months ago

To me it depends on the base image. Some don't have curl, but have wget. I would go with the flow instead of installing it myself. Especially if I can get away with not having to add more layers for an image of my own and/or using the same command for all containers