Hi Daniel,
Thanks very much for the follow-up. For CS50 at Harvard, we're preparing a Docker image that will server as the default image for a number of web apps, some written in Python, some in Node.js, and some in PHP. To keep usage uniform, we've standardized on Passenger (thank you!) to which we've effectively added some PHP support. Essentially, the
Dockerfile installs some additional dependencies, we wrap `passenger` with a
script that sets some environment variables, and we use hooks to
start and
stop php5-fpm.
It'd be ideal, though, to
start php5-fpm conditionally, only if Passenger has autodetected a Python or Node.js app, and to include some directives in our
nginx.conf.erb conditionally as well.
Might there be a clever way to determine within nginx.conf.erb which type of app Passenger has autodetected? (We could then isolate all of this conditional logic to the ERB, including the Nginx directives and Passenger hooks conditionally.)
Many thanks!
David