Standalone binary works - but how to bundle octane
Describe you feature request
Standalone binary works well and works out of the box. Nice!
However, in order to run the binary on Octane, I am doing like below:
./my-app-binary php-cli artisan octane:start --port=3008 --admin-port=8000 --workers=32 --max-requests=10000
If I just run as php-server, then it runs on FrankenServer, and not FrankenAPI. There is a huge performance difference between these two and want to be able to run the binary on FrankenAPI.
./my-app-binary php-server --listen=3008
I think I am missing something? A worker file --worker= to be passed to run to get the boosted performance. By providing worker path, it throws ERROR same as https://github.com/dunglas/frankenphp/issues/318
2024/02/27 10:59:15.032 ERROR unexpected termination, restarting {"worker": "/Users/pulkit.kathuria/git/laravel-10/public/frankenphp-worker.php", "exit_status": 255}
Anyways, my question (or feature request) is to have docs on creating standalone binary with samples of workers files.
@kevincobain2000 could you share the Dockerfile used in this process? did you embed your application and frankenphp? if you created a binary probably your worker script path is not these
Describe you feature request
Standalone binary works well and works out of the box. Nice!
However, in order to run the binary on Octane, I am doing like below:
./my-app-binary php-cli artisan octane:start --port=3008 --admin-port=8000 --workers=32 --max-requests=10000If I just run as
php-server, then it runs onFrankenServer, and notFrankenAPI. There is a huge performance difference between these two and want to be able to run the binary onFrankenAPI../my-app-binary php-server --listen=3008I think I am missing something? A worker file
--worker=to be passed to run to get the boosted performance. By providing worker path, it throws ERROR same as #3182024/02/27 10:59:15.032 ERROR unexpected termination, restarting {"worker": "/Users/pulkit.kathuria/git/laravel-10/public/frankenphp-worker.php", "exit_status": 255}Anyways, my question (or feature request) is to have docs on creating standalone binary with samples of workers files.
Hello How did you connect database when using Laravel application as Standalone binary? I can't get connected to database. The database is on same machine localhost.
I'm writing a guide explaining how to bundle Laravel and Octane apps: https://github.com/dunglas/frankenphp/pull/753
Does it help?
For the database, set the corresponding environment variables or change your .env file (don't forget to run artisan optimize:clear and artisan optimize after.
I'm writing a guide explaining how to bundle Laravel and Octane apps: #753
Does it help?
For the database, set the corresponding environment variables or change your
.envfile (don't forget to runartisan optimize:clearandartisan optimizeafter.
The database connection is now established. However, it appears that images uploaded within the application, like those stored in the public folder, aren't retained in the application. I did build self contained binary.
@skmirajbn I added a section about this: https://github.com/dunglas/frankenphp/pull/753