Deploy a subdirectory to Heroku

前端 未结 3 525
小鲜肉
小鲜肉 2020-12-05 14:39

I have one \'super\' repository in GitHub which will contain several applications I would like to deploy to Heroku. Here is an example of my repository.

/app         


        
3条回答
  •  一生所求
    2020-12-05 14:55

    This can be accomplished by putting a config.ru in your root directory that tells Heroku where to find your app. For example, with Rails 3, try a config.ru like this in your root directory:

    WEBSITE_SUBDIR = 'website'
    require "#{WEBSITE_SUBDIR}/config/environment"
    run YourApplicationName::Application
    

    And on Rails 2.x, you'll need something like this:

    WEBSITE_SUBDIR = 'website'
    require "#{WEBSITE_SUBDIR}/config/environment"
    use Rails::Rack::LogTailer
    use Rails::Rack::Static
    run ActionController::Dispatcher.new
    

提交回复
热议问题