1

I haven't been able to find a way to launch two web workers for separate language types in a single Heroku app.

I have a python app running well, and I've added a PHP app in a folder, so my procfile ideally would look something like this:

web: python pythonapp.py web: sh phpapp/index.php

Of course this doesn't work, in fact even if I remove the python worker altogether I can't get the PHP app to run via procfile. The logs just show that it's crashed and "Syntax error: "(" unexpected"

If I just load the PHP app into a Heroku app without a procfile, it runs fine.

So the question is: How to initiate a PHP app via the procfile rather than relying on Heroku to autodetect PHP?

Thanks,

-James

2
  • Might be better off just splitting them into two separate Heroku apps.
    – fixlr
    Aug 26, 2012 at 2:13
  • That's how I have it running now, but I was concerned about cross-domain code interaction limitations. Aug 26, 2012 at 3:51

2 Answers 2

1

For anyone who ends up here years after the thread was started (2020 for me), Heroku now has builtin multi buildpacks. Use this link for info and how to setup:

https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app

(Note: I got this link by starting with Kenneth Reitz's answer above).

0

It sounds like these applications should be split into two separate codebases.

However, you can achieve this with the multi-buildpack:

https://github.com/ddollar/heroku-buildpack-multi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.