Include php-fpm images #31
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Dockerfiles are right, but I have no idea about the update scripts. I tried.
This is for php-fpm. To launch this, you'd run two containers:
Your nginx would use fastcgi calls back to the php-fpm container, either by a link and a fastcgi call to tcp/9000 or by using
volumes_from
indocker-compose.yml
and configuring php-fpm to put a socket file on a volume.nginx tends to only eat about 2.5 megabytes per process. I originally did this to deal with Apache eating 6 gigabytes on a busy web server, instead having a 30-100 megabyte php-fpm process and 10 megabytes of nginx workers. That was an extremely loaded server.
As well, when running multiple applications, it's frequently useful to have a separate, non-aware nginx with a conf.d full of virtual hosts using
proxy_pass
directives to sockets on a shared volume. That allows you to run things like Drupal, OwnCloud, and Wordpress via separate compose files and databases, exposing each via a socket file; if you down one of the services, the rest work, while nginx gives "bad gateway" if you try to access the downed one. To do this over TCP, the nginx container must be started after and explicitly linked with the application container, which means one big compose file and repeatedly bringing down all applications whenever adding a new one.