Search code examples
staticbundletraefik

Is there a way to serve static resources with Traefik?


I'd like to serve static ressources such as images, js bundles, html pages... with Traefik like I was able to do with nginx

# nginx config
server {
    root /www/data;

    location ~ \.js {
        root /www/bundles;
    }
}

Many thanks Cheers


Solution

  • 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.