New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: FrankenPHP Support #5655
Comments
DDEV's goal is to simulate actual deployment environments. At this time there's no intent to work with FrankenPHP because we haven't heard of any deployment environments that use it. But as things grow over the years we'll consider it. |
Here is a example for using frankenphp in ddev. .ddev/web-build/Dockerfile.frankenphp ARG BASE_IMAGE
FROM $BASE_IMAGE
ENV FRANKENPHP_VERSION=v1.1.0
RUN curl --fail -L -o /usr/local/bin/frankenphp https://github.com/dunglas/frankenphp/releases/download/${FRANKENPHP_VERSION}/frankenphp-linux-$(uname -m) && \
chmod +x /usr/local/bin/frankenphp
ENTRYPOINT ["frankenphp", "run", "--resume", "--watch", "-c", "Caddyfile", "--envfile", ".env", "--pidfile", "/tmp/frankenphp.pid"]
# See if frankenphp is running
HEALTHCHECK --interval=1s --timeout=120s --retries=1 --start-period=120s CMD ps -p $(cat /tmp/frankenphp.pid) > /dev/null; exit $? Official support would be great. But for now i'm happy to have it running this way. |
Please consider creating an add-on for it! |
Yea, will have a look. Need to integrate this using supervisord or some other way to ensure the process is restarted |
Does it crash often? You can easily use web_extra_daemons, but if crashes a lot you'd want to put a shell script around it so it restarted. |
Well, i'm trying to get TYPO3 to work with it. Once its working properly it should not crash very often. But having some logic in place to ensure it is running makes sense to me. As you suggested i'll try to use a bash script. |
A very early stage of the addon: https://github.com/ochorocho/ddev-frankenphp
Would be great if anyone could test this and give feedback. |
Thank you @ochorocho for your outstanding support. However, I'm facing CORS issues. Could you please guide me on how to resolve them? |
i don't know which software you are trying to run. But you may need to set less restrictive cores headers in your app? |
@takielias you may have a look at https://enable-cors.org/server_caddy.html |
@ochorocho I'm using wsl2. When I use nginx/apache I do not face any problems. |
@takielias I mean is it Symfony, Laravel or any other app you are trying to run on frankenphp? |
@ochorocho Laravel |
@ochorocho Do you have any updates? |
@takielias no, i'm not using laravel at all. So i can't answer your quesitons on how to get it to work. |
@ochorocho, I tried using it with WordPress but get a 404 after running |
@fabianmarz haven't used wordpress in a while. I guess you need to change the doc root https://github.com/ochorocho/ddev-frankenphp/blob/main/frankenphp/Caddyfile#L36 |
Thanks for the response. I copied the docroot from the nginx config and set it to Sorry I'm not very experienced with Caddy and or FrankenPHP to figure out what's the issue here 🙈 |
|
I'm trying to push Drupal to use FrankenPHP, I'm interested in adding this to DDEV too :) |
If possible, I recommend using the official FrankenPHP image (which uses the "official" PHP image) as a base instead of downloading the static binary. The static binary is compiled using musl and has poorer performance than the glibc version. |
@dunglas can you provide details about "poor perf on musl"? I heard this mantra 7 years ago and it's not true for a long time now |
See dunglas/frankenphp#666 for details, benchmarks (musl is 2 times slower than glibc under certain conditions), and a potential improvement by replacing the default musl allocator, which performs badly in multi-threaded environments, by mimalloc. |
Is there an existing issue for this?
Is your feature request related to a problem?
FrankenPHP (frankenphp.dev) released its first version a few days ago. Do you have plans to integrate it with DDEV?
Describe your solution
There is a docker image available for quick setup https://frankenphp.dev/docs/docker/
Describe alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: