-
Notifications
You must be signed in to change notification settings - Fork 475
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
[1.x] Allow easy customization of the command ran by supervisor's PHP process #645
Conversation
In the Supervisor configuration, why are the variables prefixed with |
Mark as ready for review when answered please. |
Oops, that was not meant to be like that. I've amended the variables in the |
So, that leads me to my next question: was this tested at all? 😅 |
Yes, I've got this running locally. Reason it was renamed was that I published the docker files in one of my projects to test this out, but decided to make the env var name more descriptive 😅 Simply forgot to include it in all places when committing to the fork. It's working in my project now, together with the env var overridden in the |
So for context, @taylorotwell, I have this in my environment:
# other env vars
SUPERVISOR_PHP_COMMAND: "/usr/bin/php -d variablescommand=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan octane:frankenphp --host=0.0.0.0 --admin-port=2019 --port=80" Which is working just fine :) |
Can you send in a documentation PR to the Octane docs for this? |
Yep, can do. Do you want it to mention "Since 1.27.0"? @taylorotwell |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [laravel/sail](https://togithub.com/laravel/sail) | `1.26.3` -> `1.27.3` | [![age](https://developer.mend.io/api/mc/badges/age/packagist/laravel%2fsail/1.27.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/packagist/laravel%2fsail/1.27.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/packagist/laravel%2fsail/1.26.3/1.27.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/packagist/laravel%2fsail/1.26.3/1.27.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>laravel/sail (laravel/sail)</summary> ### [`v1.27.3`](https://togithub.com/laravel/sail/blob/HEAD/CHANGELOG.md#v1273---2024-01-30) [Compare Source](https://togithub.com/laravel/sail/compare/v1.27.2...v1.27.3) - \[1.x] Improves console output by [@​nunomaduro](https://togithub.com/nunomaduro) in [https://github.com/laravel/sail/pull/661](https://togithub.com/laravel/sail/pull/661) ### [`v1.27.2`](https://togithub.com/laravel/sail/blob/HEAD/CHANGELOG.md#v1272---2024-01-21) [Compare Source](https://togithub.com/laravel/sail/compare/v1.27.1...v1.27.2) - Add Support for Typesense by [@​jasonbosco](https://togithub.com/jasonbosco) in [https://github.com/laravel/sail/pull/655](https://togithub.com/laravel/sail/pull/655) - Lint sail script by [@​dimitriacosta](https://togithub.com/dimitriacosta) in [https://github.com/laravel/sail/pull/656](https://togithub.com/laravel/sail/pull/656) - Make DB_CONNECTION replacement more robust by [@​taylorotwell](https://togithub.com/taylorotwell) in laravel/sail@2276a8d ### [`v1.27.1`](https://togithub.com/laravel/sail/blob/HEAD/CHANGELOG.md#v1271---2024-01-13) [Compare Source](https://togithub.com/laravel/sail/compare/v1.27.0...v1.27.1) - \[1.x] \[[#​651](https://togithub.com/laravel/sail/issues/651)] Don't do anything if no phpunit files are present by [@​zack6849](https://togithub.com/zack6849) in [https://github.com/laravel/sail/pull/652](https://togithub.com/laravel/sail/pull/652) ### [`v1.27.0`](https://togithub.com/laravel/sail/blob/HEAD/CHANGELOG.md#v1270---2024-01-03) [Compare Source](https://togithub.com/laravel/sail/compare/v1.26.3...v1.27.0) - \[1.x] Allow easy customization of the command ran by supervisor's PHP process by [@​bram-pkg](https://togithub.com/bram-pkg) in [https://github.com/laravel/sail/pull/645](https://togithub.com/laravel/sail/pull/645) - \[1.x] Default to PHP 8.3 by [@​Jubeki](https://togithub.com/Jubeki) in [https://github.com/laravel/sail/pull/647](https://togithub.com/laravel/sail/pull/647) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/RadioRoster/backend). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjcuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@taylorotwell @bram-pkg Hey guys, these changes work but I recommend not to use this instruction with octane because octane runs like a demon which doesn't load the new code changes to the memory because of this if we change something it doesn't affect the application. Technically we can still use this with |
The behaviour of the daemon was not changed in this PR, adding the Adding the |
Yeah but if someone add the SUPERVISOR_PHP_COMMAND: "/usr/bin/php -d variablescommand=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan octane:frankenphp --host=0.0.0.0 --admin-port=2019 --port=80" to their code and start working as usual they will find that any changes they are doing is not affecting to the browser then they will discover that it happened because of the octane start without watching the file changes |
Yes, which is why there is a section in the documentation about "watching for file changes" |
This PR adds the capability to control supervisor's PHP process command using an environment variable, potentially simplifying the installation of Laravel Octane into dev envs using Laravel Sail.
Allowing for customization of the command ran by supervisor through an environment variable removes the need to publish all the underlying files used to build the image, in the simple use case of running Octane under Sail.
This does not introduce a breaking change, luckily, as changes to both the
supervisord.conf
andDockerfile
only apply after a rebuild, hence not affecting current users. After rebuilding (optional for current users), nothing would break either, as the environment variable has a sane default value that is equal to the current behaviour.