I’m trying to use the
fly.toml to get the
public directory of my Next.js app to be served by Fly’s edge, and not via Next.js (Node).
My configuration in the
fly.toml is as such:
[[statics]] guest_path = "/app/public" url_prefix = "/static"
With this, my expectation is that all files in the VM’s
/app/public/ directory is mapped to
/app/public/images/faq.svg will be mapped to
However, when I deploy this configuration change with
flyctl deploy, the JSON output
flyctl config display has no trace of the
statics mappings (doesn’t exist at all). Likewise, all the routes (e.g. example.fly.dev/static/images/faq.svg) are simply being directed to the underlying Next.js (Node) server, which gives its 404 error.
Any advise here? My app is being build remotely on Fly.io’s infrastructure using the