Configure web root

I’m testing out Fly with Laravel. The app appears to launch great, but the web root is incorrect. I need to use url’s such as misty-waterfall-6990.fly.dev/public/index.php.

This is basic usage, literally just created a fresh Laravel application and ran flyctl launch. I see it’s using buildpacks from Heroku, but I’m not sure how to configure these within Fly.io.

I’m capable of creating my own Docker images if need be, but I’m not sure that I need to!

Is there a way to configure the web root path? I don’t see this documented.

1 Like

You are right about this happening in the buildpack. If you create a Procfile like this is might do what you want:

web: vendor/bin/heroku-php-apache2 public/

A Dockerfile will work fine, but we’d like to be good at Laravel apps without one. Will you let me know if that works, and I’ll have a closer look at your app if it doesn’t?

1 Like

That did the trick, thanks!

https://still-wave-2966.fly.dev/ is working

1 Like