mirror of
https://github.com/php/frankenphp.git
synced 2026-03-24 00:52:11 +01:00
1.1 KiB
1.1 KiB
Laravel
Docker
Serving a Laravel web application with FrankenPHP is as easy as mounting the project in the /app directory of the official Docker image.
Run this command from the main directory of your Laravel app:
docker run -p 443:443 -v $PWD:/app dunglas/frankenphp
And enjoy!
Local Installation
Alternatively, you can run your Laravel projects with FrankenPHP from your local machine:
-
Add the following configuration to a file named
Caddyfilein the root directory of your Laravel project:{ frankenphp order php_server before file_server } # The domain name of your server localhost { # Enable compression (optional) encode zstd gzip # Execute PHP files in the current directory and serve assets php_server } -
Start FrankenPHP from the root directory of your Laravel project:
./frankenphp run
Laravel Octane
See this Pull Request.