h4ck3r+=boi v 2.0

  1. Search
  2. About
  3. Subscribe
  4. Archive
  5. Random

h4ck3r+=boi v 2.0

Newer
Older
  • Using Foreman to manage your (development only) services

    Often developing Rails apps I need several things running at the same time. Rails server, beanstalkd, background processor etc.

    This is not a new problem, and the Foreman gem handles this very well.

    Most of my deployments are on Heroku. Heroku gives me easy scaling for early stage startups, letting my customers defer the harder deployment problems until they really have to. Heroku gives my clients the simplest thing that could possibly work at the early stage.

    For Heroku normally you specify services you want to run in the Procfile. Heroku will fire up these services when you deploy your app.

    There are some services that Heroku runs for us, that you do not need to specify in the Procfile. For example, many of my clients require searching, and I use WebSolr’s Heroku addon for that. I do not have to specify that in the Procfile, because WebSolr happens “in the cloud”, on Websolr’s servers.

    But I want to use Foreman to bring up everything I need for my development server. Which does include a local Solr server

    To solve this problem, I created a Procfile_development file. Just run Foreman like so:

    bundle exec foreman start -f Procfile_development

    I suggest you create a shell alias for this command. Something like fore_dev

    This way I can have a Procfile for production, and have another file to specify all the services I need for development.

    .

    Posted on October 28, 2011

  • staff

Field Notes Theme. Designed by Manasto Jones. Powered by Tumblr.