-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Unit: Scripts located in /etc/unit/config.d completely overwrite the Unit configuration #451
Comments
I used the logic from the official images: To my understanding, we want this to happen because I am placing a JSON file for the config here:
@TheAndrey: If you have any thoughts or feedback, I would love to hear it. |
I decided not to continue using unit any further. Its main disadvantage is it's very limited configuration capabilities - there is no support for nested locations and rewrite. Unit was convenient only because everything works within a single process. |
Thanks for sharing your feedback! I feel kind of the same way. It's been more difficult to use than I expected. I am eager to give FrankenPHP a try and hoping to find a single process container to make managing PHP much easier 😃 Still lot's of work to do to the PR below. Stay tuned! |
Just chiming in here, ran into a similar situation while playing with Unit. Before I saw
I assumed dropping the script in The solution in this example would require my JSON file to be
and PUT’ing that to I love the appeal of Unit and everything being a single process. Coupled with something like Cloudflare I think you can get pretty close to what you would have with Nginx + PHP-FPM. I think you can deal with some of Unit's limitations higher up the chain. I think something like Unit or FrankenPHP is the future. Happy to not deal with PHP-FPM configurations anymore. Thanks for all your work on these! |
Thanks a ton for chiming in as we learn this stuff together!
I totally agree with this. I am stoked to get 3.4 out the door because it's finally the release where FPM does what it needs to do and gets out of the way when we don't need it. I'll leave this issue open for a future release and will see how things pan out with FrankenPHP. I will be so stoked to put FPM on the shelf someday 😃 |
I would also like a method for changing the Unit configuration when necessary. In my application, I have a handful of routes that I need to add. I current have a full Unit configuration file based on the As @kylecotter said above, Unit provides methods for updating a portion of the configuration, but you will need more than simply processing all of the files in a folder, as you need to know the proper config URI and HTTP method in order to avoid overwriting the entire config. These types of changes may better handled with an entry point script that can apply the custom configuration changes after the default configuration is set. I'll attempt to move my changes to that method to see how complicated it is. |
I am all for any improvements that the community sees fit. My goal would be to get it to work as much as our In regards to the original part of this issue, this behavior was pulled from the default NGINX Unit image. I am all for refactoring this into a better DX if possible. |
I ended up create a completely new config.json and overwrite the default. It's the only way I could turn off the default behavior of having php route every call through index.php which is what you'd want with laravel etc. I tried creating a custom image with FrankenPHP but ran into other difficulties with Franken and my app so went back to this. None of them are quite on par feature wise. I'm sticking with unit for now. |
Thanks for the feedback! I am thankful to hear some real world experience 🙌 |
@TheAndrey I've abandoned nginx unit as well. It's good but limited as you say. |
Steps To Reproduce
TBD
Outcome
What did you expect?
What happened instead?
Affected Docker Images
Unit images only
Anything else?
Originally reported by @TheAndrey in #412:
The text was updated successfully, but these errors were encountered: