splitbrain / docker-phpfarm

A Dockerfile to build an image running multiple PHP versions on Apache
http://www.splitbrain.org/blog/2014-02/02-docker_phpfarm
MIT License
225 stars 60 forks source link

Consider adding nginx support #6

Closed richardtape closed 8 years ago

richardtape commented 8 years ago

Hi!

First, let me get this out of the way: this is awesome. Thank you for putting it together.

I'm in the middle of setting up a testing environment for the stuff we make at work and on personal projects. We need to quickly be able to test on many different environments from the same codebase. And this, frankly, is an amazing start.

I'm way more than happy to contribute to this project, but want to open some dialogue in terms of support for other pieces to this stack.

First; nginx rather than apache. Thoughts?

splitbrain commented 8 years ago

To be honest I don't see any advantage of nginx over apache in this project. Especially since the base system is quite old, so you would get an old nginx anyway. The webserver isn't doing much here anyway except passing requests to php-fcgi. In addition many projects depend on mod_rewrite or .htaccess files so Apache is a very common denominator.

What do you think would nginx improve?

richardtape commented 8 years ago

I see what you're saying, however, I have to disagree with

In addition many projects depend on mod_rewrite or .htaccess files so Apache is a very common denominator.

Many, many new setups are using nginx as the webserver (and many more use it as a (reverse) proxy). Having that as an option here could only be beneficial.

Compiling newer versions of nginx on deb wheezy is doable. Tricky, but doable.

And, as you say, the web server isn't doing much other than passing requests to php-fcgi so being able to test a basic setup with different web servers would be beneficial.

If you don't want to support it, that's fine, and completely understandable, I'm just not sure I agree with the reasons you gave (and that's probably more to be me misunderstanding them than anything else).

splitbrain commented 8 years ago

Again, you didn't provide any advantage of having nginx. Many people use it. true. Many people use apache. Many projects work out of the box with apache (wordpress, dokuwiki, ...). They need special config for nginx (because missing .htaccess and mod_rewrite).

Goal of this project is providing a quick way to test things in different php versions. If you can provide a use case of how adding nginx would help with that goal I'm happy to consider a pull request.

richardtape commented 8 years ago

I guess I was hoping to make this more of a generic testing tool. Perhaps that's not the best way forward. Thanks for taking the time to reply. Closing.

splitbrain commented 8 years ago

that's the beauty of docker. each image does one thing well. you could always use a reverse proxy nginx in front of this image...