dunglas / frankenphp

🧟 The modern PHP app server
https://frankenphp.dev
MIT License
6.75k stars 226 forks source link

Yii2 support #604

Open smartycoder opened 7 months ago

smartycoder commented 7 months ago

Describe you feature request

Is there a plan to support Yii2 framework or is there any example for docker.

razvanphp commented 4 months ago

It just works, you only need to link web folder to public or change the default Caddyfile.

dunglas commented 4 months ago

Would you mind opening a docs PR to explain how to serve Yii?

razvanphp commented 4 months ago

Yes, sure, I'm currently building a PR for yiisoft/yii2-docker.

The official Yii2 images also inherit from official PHP docker, but I just miss a way to extrapolate from something like PHP_BASE_IMAGE_VERSION=8.2-zts into the tag for frankenphp docker image. Ideally it should be the exact same PHP version, down to path version, but it can be that the MINOR version might be out of sync and symbols might not be found.

Any suggestion on how to relink the frankenphp binary to the actual php installed? Or the compilation from source is the only way?

Current approach:

COPY --from=dunglas/frankenphp /usr/local/bin/frankenphp /usr/local/bin/frankenphp