Deploy non-rails application

1 view
Skip to first unread message

pepe

unread,
Nov 18, 2009, 6:36:34 AM11/18/09
to Inploy
Hello,
I'm using inploy for deploying rails application and it works
perfectly. But right now, I need to choose deploy strategy for non-
rails (sinatra) application. Do you thing it's possible to bend it
little (haven't looked to code too much) for this purpose. Don't want
you to push to it ;), just little expertise if it's possible, I would
try to figure it out myself if you would think it's easy/medium easy.

thanks for any thoughts on idea

pepe

Diego Carrion

unread,
Nov 18, 2009, 8:34:16 AM11/18/09
to inp...@googlegroups.com
Hi Pepe,

it should be really easy. Inploy has a support for 'templates'. A template is a module that overwrites methods, so you can have something like this for example:

module Inploy
  module Templates
    module Sinatra
      def after_update_code
         do_my_thing
      end
    end
  end
end

and then configure your deploy.rb something like this:

deploy.template = :sinatra
deloy.host = ...
deployst. ...

The method after_update_code if called every time the code is updated, so by default it inits the submodules, copies some file, install gems, etc... 

If you dont want to overwrite the entire method and just a part of it, the install gems and migrate database steps for example, you can define something like this:


module Inploy
  module Templates
    module Sinatra
      def install_gems
      end

      def migrate_database
      end
    end
  end
end


Hope that helps :)

pepe

unread,
Nov 19, 2009, 4:20:03 AM11/19/09
to Inploy
Thanks for reply! I'll try it (right now bending bundler) and send a
message how it went.

Thanks again, it seems almost too easy ;).

pepe
Reply all
Reply to author
Forward
0 new messages