This could be failing because statics need to exist in the Docker image. Perhaps, you could try using a python specific statics middleware, something like wsgi-static-middleware · PyPI to see if images are handled properly?
So static files need to exist in the docker image when the fly app is starting? They can’t be i.e. added while the app is running? I.e. download a file and move it into /public to make it (static) aviable to the public?
Edit:
Oh!
These assets are extracted from your Docker image and delivered directly from our proxy on worker hosts.
Removed the statics part from my toml and adjusted it like this:
[[services.ports]]
force_https = true
handlers = ["http"]
port = 8000
Should this work?
Expected a “hello world”, but getting the resolve issue
curl -i https://myproject.fly.dev # same for curl -i https://myproject.fly.dev:8000
curl: (6) Could not resolve host: myproject.fly.dev
Feels like I’m missing something else here. If this is runnign from the deployed Dockerfile do I need to define 8000 in there as well? Not too familiar with this.
Looking at this now: Troubleshooting your deployment · Fly Docs
Looks like I messed up ports and my app was also missing an ip v4 address.
After some back and forth it’s working. Thanks for the hint.