Is there a way to serve static resources with Traefik?

Traefik doesn't serve static files (it's a not a web server it's a reverse proxy/load balancer).

You must use a container, which contains a web server with your files.


To extend the answer related to how files can be served:

If you are already serving files with nginx and want to migrate to Traefik you can still have nginx serving static files behind Traefik. I do this myself in hobby projects running docker standalone on a VM.

The best way is probably still to use containers/buckets such as S3 or Swift for static files as it will offload the traffic to the application server and provide a single location for these files (makes things easy when clustering) .. but if you don't have a lot of traffic and use a very simple setup, the nginx way is more than fine.

The issue around static files was discussed here : https://github.com/containous/traefik/issues/4240