Search code examples
pythonnode.jsibm-cloud

multiple runtimes in a single bluemix app?


I'm trying to run a hobby project on bluemix that is a combination of nodejs and python, that expects the runtimes to be collocated.

At first, I didn't even know there was a python dependency. So I deployed based on the node SDK starter app.

There is a "requirements.txt" for python dependencies, but I can see it's not really being used. Is there something I can do to get deployment to recognize that the app is a hybrid like this, IOW to process the requirements.txt so when python is invoked my deps are there?


Solution

  • In general, I would recommend splitting the application up so they do not have this dependency. But if you can't, I can think of two options:

    1. Use multi-buildpack. Create the .buildpacks file in the application root directory and push your application with -b https://github.com/ddollar/heroku-buildpack-multi.git option. During staging, the buildpacks specified in that file will be called on your application.
    2. Write your own custom buildpack. It's not that difficult and you can only do the minimum your application needs.