Search code examples
node.jsnginxopenshiftopenshift-cartridge

Openshift with nodejs and nginx


context

I've a running app on Openshift using a nodejs (nodejs-0.10). I would like to add a ngix as first proxy to serve static files only.

problem

The question is how to add nginx to a running app on Openshift. I saw this cartridge gsterjov/openshift-nginx-cartridge but the README instructs how to create a new app using the nginx, but not how to add it to an existing app.


Solution

  • You can not add a secondary web framework cartridge to an application. Each application can only have one web framework cartridge installed at a time. You might need to setup a second application and setup nginx as a proxy if you want the requests to hit that first and serve static assets, then proxy the dynamic requests back to your node.js application.