Peter,

Sorry, but not sure if I understand your answer. All our apps are cooked up 
in one repo, and they reference each other. How do I go about splitting 
them up into different apps on Heroku, and how would I deploy to from the 
Linux box to Heroku? Would they have different Profile, or where would I 
specify which app to run?

Sorry to have been bothering you with this. If there's any documentations I 
could read online, I'll stop :)

Thanks again.

-Tam

On Tuesday, May 7, 2013 5:50:51 PM UTC-4, Peter van Hardenberg wrote:
>
> Hi Tam,
>
> only one dyno type per app can route web traffic. This is not a big deal 
> for you though: just create one app for each process type that needs to 
> route internet traffic.
>
> Also - you'll want to have each app listen on process.env.port on Heroku.
>
> -p
>
>
>
> On Tue, May 7, 2013 at 1:08 PM, Tam Nguyen <[email protected] <javascript:>
> > wrote:
>
>> Peter,
>>
>> Actually, I left out one important piece of information: we have 3 apps 
>> (Sockets, Dashboard, and PortalAPIs) within our Node repo, and they run on 
>> different port: 3000, 5000, and 5001. I've tried scaling it up to 3 web 
>> dynos, but nothing has really changed; only one of our apps, appSocket.js, 
>> gets run.
>>
>> Any more information you need to help me fix this?
>>
>> Thanks!
>>
>>
>> On Monday, May 6, 2013 6:50:03 PM UTC-4, Peter van Hardenberg wrote:
>>
>>> Hi Tam,
>>>
>>> each dyno type needs to have its own name, and only one dyno type (web) 
>>> can receive HTTP traffic. Also, by default only a single `web` dyno gets 
>>> run, since you only get 750 dyno-hours free per month. To run more 
>>> processes, you'll need to do something like:
>>>
>>> $ heroku scale worker=1 otherworker=1
>>>
>>> Please note that each additional dyno will cost you about $35/mo 
>>> ($0.05/hr) after the 750 free dynohours are consumed.
>>>
>>> -p
>>>
>>>
>>> On Mon, May 6, 2013 at 9:52 AM, Tam Nguyen <[email protected]> wrote:
>>>
>>>> So I have a Nodejs app that I need to deploy onto Heroku as production. 
>>>> I have a Procfile, which specifies to run 3 web processes. Only one of 
>>>> them 
>>>> gets run on Heroku:
>>>>
>>>> [ec2-user@ip-10-0-1-249 NodeApps]$ cat Procfile
>>>> web: node Applications/Dashboard/app.js
>>>> web: node Applications/PortalAPIs/**portalAPIs.js
>>>> web: node Applications/Sockets/**appSocket.js
>>>>
>>>> [ec2-user@ip-10-0-1-249 NodeApps]$ heroku ps
>>>> === web (1X): `node Applications/Sockets/**appSocket.js`
>>>> web.1: crashed 2013/05/06 16:43:59 (~ 3m ago)
>>>>
>>>> The rest don't get run. I think what happens is my production 
>>>> environment doesn't get recognized for some reason. Here's the foreman log:
>>>>
>>>> [ec2-user@ip-10-0-1-249 NodeApps]$ foreman start
>>>> 16:48:35 web.1  | started with pid 4545
>>>> 16:48:35 web.1  | started with pid 4546
>>>> 16:48:35 web.1  | started with pid 4547
>>>> 16:48:35 web.1  | Started process pid: 4545
>>>> 16:48:35 web.1  | Started process pid: 4546
>>>> 16:48:35 web.1  | Started process pid: 4547
>>>> 16:48:35 web.1  | info: socket.io started
>>>> 16:48:35 web.1  | { domain: null,
>>>> 16:48:35 web.1  |   _events:
>>>> 16:48:35 web.1  |    { request: [Function],
>>>> 16:48:35 web.1  |      connection: [Function: connectionListener],
>>>> 16:48:35 web.1  |      clientError: [Function],
>>>> 16:48:35 web.1  |      error: [Function],
>>>> 16:48:35 web.1  |      upgrade: [Function],
>>>> 16:48:35 web.1  |      close: [Function],
>>>> 16:48:35 web.1  |      listening: { [Function: g] listener: [Function] 
>>>> } },
>>>> 16:48:35 web.1  |   _maxListeners: 10,
>>>> 16:48:35 web.1  |   _connections: 0,
>>>> 16:48:35 web.1  |   connections: [Getter/Setter],
>>>> 16:48:35 web.1  |   _handle:
>>>> 16:48:35 web.1  |    { fd: 18,
>>>> 16:48:35 web.1  |      writeQueueSize: 0,
>>>> 16:48:35 web.1  |      onconnection: [Function: onconnection],
>>>> 16:48:35 web.1  |      owner: [Circular] },
>>>> 16:48:35 web.1  |   _usingSlaves: false,
>>>> 16:48:35 web.1  |   _slaves: [],
>>>> 16:48:35 web.1  |   allowHalfOpen: true,
>>>> 16:48:35 web.1  |   httpAllowHalfOpen: false,
>>>> 16:48:35 web.1  |   timeout: 120000,
>>>> 16:48:35 web.1  |   _connectionKey: '4:0.0.0.0:5001' }
>>>> 16:48:36 web.1  | mongodb://10.61.2.112/portal
>>>> 16:48:36 web.1  | mongodb://10.61.2.112/portal
>>>> 16:48:36 web.1  | connection error: { [Error: Trying to open unclosed 
>>>> connection.] state: 2 }
>>>> 16:48:36 web.1  | connection error: { [Error: Trying to open unclosed 
>>>> connection.] state: 2 }
>>>> 16:48:36 web.1  | connection error: { [Error: Trying to open unclosed 
>>>> connection.] state: 2 }
>>>> 16:48:36 web.1  | Listening on port 3000...
>>>> 16:48:36 web.1  | DB Connection Open!
>>>> 16:48:36 web.1  | DB Connection Open!
>>>> 16:48:36 web.1  | DB Connection Open!
>>>> ^CSIGINT received
>>>> 16:48:39 system | sending SIGTERM to all processes
>>>> 16:48:39 web.1  | exited with code 130
>>>>
>>>> As you can see, it keeps using my local mongodb connection string. 
>>>> Here's my env:
>>>>
>>>> [ec2-user@ip-10-0-1-249 NodeApps]$ heroku config
>>>> === pure-badlands-3473 Config Vars
>>>> GITHUB_USERNAME:      [redacted}
>>>> MONGOLAB_URI:         [redacted}
>>>> NEWRELIC_LICENSE_KEY: [**redacted}
>>>> NODE_ENV:             production
>>>> PATH:                 bin:node_modules/.bin:/usr/**
>>>> local/bin:/usr/bin:/bin
>>>> dbConnectionUrl:      [redacted}
>>>>
>>>> What am I doing wrong? Please help me, and feel free if you need any 
>>>> more info.
>>>>
>>>> Thanks so much!
>>>>
>>>> -Tam
>>>>
>>>> -- 
>>>> -- 
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Heroku" group.
>>>>  
>>>> To unsubscribe from this group, send email to
>>>> heroku+un...@**googlegroups.com
>>>>
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/heroku?hl=en_US?hl=en<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 heroku+un...@**googlegroups.com.
>>>>
>>>> For more options, visit 
>>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>  
>>>>  
>>>>
>>>
>>>  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Heroku" group.
>>  
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
-- 
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