Feature Request: Docker-based php-fpm containers #1133
Replies: 5 comments
-
I love this idea.
|
Beta Was this translation helpful? Give feedback.
-
IMO if this is the direction Valet is going to go, then first Valet should be refactored to just be a "DNS+domains" helper tool, which by default connects homebrew Nginx/PHP or optionally connects Docker-served Nginx/PHP (but without doing any docker management whatsoever: just passing it to Takeout) Mangling the current PHP/Nginx treatment without abstracting it out first will result in chaos. The result is Valet becomes something less than what it does today. |
Beta Was this translation helpful? Give feedback.
-
Eh, I'm more inclined to keep Valet as a primarily-Brew-managed tool; if it's impossible to do this well without mangling Valet I'd rather we build a bridge or something. That said, to be clear: I don't think we should make any changes to Nginx, only PHP. |
Beta Was this translation helpful? Give feedback.
-
Agreed: remaining Brew-focused is essential. Here's a slightly updated explanation of what I meant earlier: As for the "DNS+domains helper" comment, I'll clarify: lots of people say they "want Valet and (something)" (eg docker/etc), but don't state what they mean by the "want Valet ...." part. Usually I discover what they mean by that is the simplified local project directory + domain resolution stuff, and have all that point to their webserver+php version/s of choice. And the reason they want "choice" over webserver/php stuff is because they have project-specific requirements such as ancient PHP versions or alternate webserver engines so they're containerizing that stuff or proxying it away someplace. So, if we tackle the part about being able to specify a certain PHP connection/provider per-domain without just overwriting all configs when changing the PHP version, that will likely significantly improve the flexibility desired. As to how to denote which PHP service to use ... well ... that needs exploration.
I prefer to avoid more json files, as that leaves garbage behind and means more places to fail. Parsing the nginx files is probably best, and probably means we should add a text placeholder "section" where we replace the fastcgi provider text between start/end block of the placeholder lines. Sorry, I've probably repeated myself a bunch here. Need a coffee break! |
Beta Was this translation helpful? Give feedback.
-
Right! Got it.
I was thinking it would have to live in But I guess we could try the nginx thing too? That seems.. a bit hairier for me, though, which is why I'd prefer Json?
Yah, I think the hardest part of this whole thing is how Valet would know what's available and how it would clean up. I often switch PHP versions globally with Valet and then some other parts of my system break. I really wish there were a single repository system that had knowledge of the state of my running PHP installs--both with Brew and, now, with Docker. |
Beta Was this translation helpful? Give feedback.
-
I'd like to see the php-fpm layer of Valet be able to use Docker containers to support multiple version of PHP concurrently. This would be configurable per site if necessary, but default to the latest version of PHP that Valet uses.
Valet + Docker-based php-fpm containers + Takeout would be amazing.
Reference Tweet:
https://twitter.com/aka_tpayne/status/1299427266418667521?s=20
Beta Was this translation helpful? Give feedback.
All reactions