Closed josh closed 13 years ago
Josh, that would be awesome. I just recently tried out Pow and was like: "wtf it actually worked!" but since recently I switched to doing everything with Procfile in development and Upstart (exported via Procfile and Foreman) in production.
This is what my Procfile looks like in development:
rails: cd rails && bundle exec unicorn -p $PORT
faye: cd faye && bundle exec thin start -R app.ru -p $PORT
monitor: cd monitor && bundle exec ruby app.rb
It would be great if support could be added for this, not sure what you'd require but all I have to do to get it up and running is to execute foreman start
and it just works. Though, it would be nice to be able to specify the port for Foreman: foreman start -p 3000
since for example the Faye process is dependent on Rails' port etc.
I think if somehow support could be added to Foreman, and still be able to specify options/flags, that'd totally kick ass. Foreman is truly awesome and has become a must-use tool in my dev box. :)
This might have been obvious, but here's a plan for implementing this feature:
Procfile
in the application root, start the app with foreman on a random portI'd be happy to help with this (including #61).
@josh seeing as you closed #61, does that mean pow won't support Procfiles?
I don't have time to work on it.
Would love support for this for a Sinatra app hosted on Heroku's Cedar stack. http://devcenter.heroku.com/articles/ruby#declare_process_types_with_foremanprocfile
Why was this closed? It'd make Pow great for anyone moving to Cedar.
Feel free to reopen it with a patch. :)
A bit more serously though, since I've finished #61, I plan to work on this in the coming weeks. :)
+1
@lackac If you need help or test, I will be pleased to help.
@cyberdelia thanks, sadly I still don't see exactly when I can get around to work on this. It's important for me though, so I will find the time.
I've implemented a first cut at support for Foreman applications, including node.js apps, by having Foreman start up the processes, and then proxying requests to a randomly chosen web process (like Heroku does).
Woah.
I'm not sure how this issue turned into a pull request. Can you create a separate pull for this.
@timshadel I think this might be a github pull request bug. Can you tell me how you created the pull? For now, I've manually disconnected the association.
Sure. @technoweenie showed how to do it on this SO thread. I think it's totally awesome, but I could totally be missing the easy way to do what I care about.
Two use cases:
So what am I missing? How do most people do this? New pull request with "closes #original" in the message?
I don't think you should be able to edit my issue unless you're a collab or the original author. I'll see about getting that fixed.
OK. I'll open another one.
Since you haven't opened a new pull request yet, I'm going to comment here.
I've checked out the implementation and tested it with a few apps. It worked wonderfully. I like that all the output from foreman go to the application log.
One issue I've found was the lack of error handling. If foreman is not installed or the version installed doesn't have your patches all requests will hang. Most errors could be easily parse-able from foreman's output and a helpful error message could be presented to the user for each request.
The Procfile appears to be the new hotness from Heroku. Much of Pow's original design was to make local dev as easy as it is to deploy to Heroku.
I'm not sure how much work it would take, but I'd love to support Procfile in Pow. I still need to play with it some more, but it seems awesome for other things like memcache and redis to automatically spawn up along with your application.
http://devcenter.heroku.com/articles/procfile