Skip to content
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

docs: Laravel example #231

Merged
merged 3 commits into from
Oct 3, 2023
Merged

docs: Laravel example #231

merged 3 commits into from
Oct 3, 2023

Conversation

dunglas
Copy link
Owner

@dunglas dunglas commented Sep 28, 2023

TL;DR: docker run -p 443:443 -v $PWD:/app dunglas/frankenphp is all you need to start a Laravel application with FrankenPHP!

I'll now look at how to use Octane to enable worker mode.

docs/laravel.md Outdated Show resolved Hide resolved
docs/laravel.md Outdated Show resolved Hide resolved
docs/laravel.md Outdated
# The domain name of your server
localhost

route {
Copy link
Contributor

@francislavoie francislavoie Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of route, you can use order php before php_fastcgi (or before reverse_proxy or whatever you prefer, see https://caddyserver.com/docs/caddyfile/directives#directive-order) in global options. Removes a level of nesting.

docs/laravel.md Outdated
# FrankenPHP!
@phpFiles path *.php
php @phpFiles
encode zstd gzip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you used route, PHP responses won't be gzipped, which is unfortunate. I'd put this earlier (or just remove route as mentioned earlier)

@dunglas dunglas merged commit 5874072 into main Oct 3, 2023
28 of 29 checks passed
@dunglas dunglas deleted the docs/laravel branch December 3, 2023 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants