On Tue, May 7, 2013 at 3:19 PM, Tam Nguyen <[email protected]> wrote:
> Yes, that sounds about right. Is that possible?

Yes, although my solution is a little gross, I think.

Naively, one could prepare two different Procfiles with different web
commands, but that's annoying because it pretty much forces you to
keep several slightly modified versions of your software, and probably
constantly rebase them.  So let's say that option is not one is
willing to accept...

To avoid that, one must use some kind of discriminator as to what app
code is running in that is not stored in the repository, and the
common place to do this is in configuration variables (e.g.
config:add).  So, one can make a wrapper script that is invoked the
same way across all apps for 'web', but interprets the environment
variables injected by the config differently.

In addition, the ps:scale state is stored out-of-line from the
application, so if you have different worker processes on different
applications, you can choose to give them different names and scale
only the workers you need.  For example: ps:scale fooworker=1
barworker=0 on one application and ps:scale fooworker=0 barworker=1 on
another. Alternatively, you could re-use the configuration variable
approach that you have to use with 'web' (since 'web' is special and
must be named as such on all applications) and have one entry in
Procfile that has the same name but executes differently depending on
the application configuration.

I realize this is a little bit abstract and probably would be well
served by an example, so let me know if you'd like me to make up a
more detailed one, or if the gist I provided so far has been enough to
point you in the right direction.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to