I have a working (gunicorn, uvicorn, fastapi) setup with TLS provided by Let's Encrypt. I now want to add nginx or caddy to be a file server. It should listen on a couple of paths /static /videos and serve files requested on those paths.
So let's say the domain is service.example.com. app-http is redirecting to app-https and listening for all paths on that domain
I've added an nginx container listening on the same domain with label
- "traefik.frontend.rule=Host(`japanese-joinery.ultrabob.com`) && PathPrefix(`/static/`, `/videos/`, `/screencaps/`)"
Nothing seems to get routed to the new container. I tried adding an inverted PathPrefix rule to the app-https service
- "traefik.frontend.rule=Host(`japanese-joinery.ultrabob.com`) && !PathPrefix(`/static/`, `/videos/`, `/screencaps/`)"
but I see a message in the logs
level=error msg="error while parsing rule !PathPrefix(
/screencaps/): ! is not supported" entryPointName=http routerName=app-http@docker
I also wonder if this new service will be able to seamlessly use the certificate that is being procured for app-https or if I will need some config to make that happen.
I'm sorry for a bit of a broad question, I'm not sure how to simplify my setup to get to the core of things without either removing the TLS part altogether or do a new dns setup so I can test locally.