frankenphp icon indicating copy to clipboard operation
frankenphp copied to clipboard

Make public/ folder configurable via env

Open razvanphp opened this issue 1 year ago • 4 comments

Describe you feature request

We tried frankenphp official docker image with Yii2 framework, but our public folder is called web instead of public.

Can we make this configurable via some ENV variable in the official image?

I could probably override it in my own Dockerfile and Caddyfile, but it would be beneficial for other users too.

Thank you for this great piece of software! R

razvanphp avatar May 04 '24 17:05 razvanphp

https://github.com/dunglas/frankenphp/blob/12fb11eeaddb0ff63fc8e521c296659d54a83542/caddy/frankenphp/Caddyfile#L31

Maybe we could change it to root * {$SERVER_ROOT:public/} ?

razvanphp avatar May 04 '24 18:05 razvanphp

Wouldn't it be better to override the Caddyfile in a custom stage?

dunglas avatar May 07 '24 06:05 dunglas

Indeed, but it would be nice to have one-liner working with the official docker image for local development.

Should be backwards compatible as the default will still be public/

razvanphp avatar May 07 '24 06:05 razvanphp

Ok, why not!

Do you want to open a PR?

dunglas avatar May 07 '24 08:05 dunglas