Open megavolkan opened 11 months ago
there is no information on how to use/install the binary? Where to put it? Rename it?
Where do you want to use it? If you want it globally installed, you can put it somewhere in your PATH (like /usr/bin/frankenphp
if it is anything like Linux) or you can put it right in your project (like some people do with composer.phar
).
Using binary seems to be a great option but there is no clear documentation on how to use downloaded binary from scratch.
You should be able to run ./frankenphp --help
and get some useful output, and if not, be sure to point it out. Beyond that, take a look at this page to get a pretty good idea on how to configure it (specifically, the Caddyfile part).
Hopefully, this helps!
This is still a relatively young project, so there is a ton of missing documentation, installers, and stuff like that. Contributions welcome!
For the latest frankenphp use next snippet.
please run in your project folder or any other folder
curl -L -o frankenphp https://github.com/dunglas/frankenphp/releases/latest/download/frankenphp-linux-x86_64
chmod +x frankenphp
./frankenphp --version
I have a similar use case and I am willing to write a documentation page for it. It would be aimed specifically at being an alternative to Caddy + PHP-FPM with the promise of being easier to setup. I will leave my idea of outline below, but I am still new to Caddy and FrankenPHP, so any guidance is appreciated (I also need this guide).
frankenphp<arch>
to /bin
as frankenphp
frankenphp phpserver --help
I am writing it mainly for a Raspberry Pi (Debian) setup as that is what I am familiar with.
Also, it is not entirely clear where frankenphp stops and Caddy starts (for example, the /etc/caddy/Caddyfile is shared) so I could elaborate that.
Let me know if that sounds good and is helpful!
Also, it is not entirely clear where frankenphp stops and Caddy starts
Basically, frankenphp adds a php_server
directive to caddy, that is documented here: https://github.com/dunglas/frankenphp/blob/main/docs/config.md
Everything outside of that is 100% caddy.
move frankenphp
to /bin as frankenphp
I have php-zts (ppa:ondrej/php-zts
vs ppa:ondrej/php
) installed locally and then build frankenphp from source (essentially using the instructions specified in the dockerfile) which nets more speed and easier to install extensions.
Here's the gist:
apt-get -y --no-install-recommends install \
libargon2-dev \
libbrotli-dev \
libcurl4-openssl-dev \
libonig-dev \
libreadline-dev \
libsodium-dev \
libsqlite3-dev \
libssl-dev \
libxml2-dev \
zlib1g-dev
/usr/src/frankenphp
and cd
into ithttps://go.dev/doc/install
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.23.1.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go install -ldflags "-w -s -X 'github.com/caddyserver/caddy/v2.CustomVersion=FrankenPHP'"
Some notes:
php -i | grep 'Configure Command'
for --enable-zend-max-execution-timers
if you want to set max execution time in frankenphp.apt install php-EXT
. You may need to rebuild frankenphp when you update your php installation.This isn't well-documented (because it will vary from distribution to distribution, etc). But this should serve as a decent starting point.
Thank you for taking the time to write it out. However this seems still too challenging as of now. Specifically point 2 and I am also lacking Golang experience.
I have downloaded standalone binary file for my M1 Mac mini (frankenphp-mac-arm64). But there is no information on how to use/install the binary? Where to put it? Rename it? I'm a docker user but trying to escape from the complexity of docker. Using binary seems to be a great option but there is no clear documentation on how to use downloaded binary from scratch.